#T335. 整数去重

整数去重

Description

Given a sequence of n integers, the task is to perform a deduplication operation on this sequence. Deduplication means that for each duplicate number in the sequence, only the position where the number first appears is retained, and all subsequent occurrences are removed.

Input Format

The input consists of two lines:

  • The first line contains a positive integer n (1 ≤ n ≤ 20000), representing the number of integers in the second line's sequence.
  • The second line contains n integers separated by a single space. Each integer is greater than or equal to 10 and less than or equal to 5000.

Output Format

The output consists of only one line. It displays the non-repeating numbers in the order they originally appeared in the input, separated by a single space.

5
10 12 93 12 75

10 12 93 75