#C13352. Unique Elements

    ID: 42881 Type: Default 1000ms 256MiB

Unique Elements

Unique Elements

Given an array of integers, the task is to return a list of unique elements preserving their original order. In other words, remove all duplicate occurrences while keeping the first occurrence intact.

Input Format: The first line contains an integer \(N\), the number of elements. The second line contains \(N\) space-separated integers.

Output Format: Output the unique elements separated by a single space, in the same order as they first appeared in the input.

Please use standard input (stdin) for reading the input and standard output (stdout) for printing the result.

inputFormat

The first line contains an integer \(N\) representing the number of elements. The second line contains \(N\) space-separated integers.

outputFormat

A single line containing the unique integers from the input, separated by a space, in the order of their first occurrence. If there are no numbers, output an empty line.

## sample
10
1 3 3 1 5 2 3 2 2 5
1 3 5 2