~/algor $ cat problems/massiv-takrorlarni-ochirish
Removing duplicates
Easy
1000 ms
64 MB
28%
An array of $n$ integers is given. Keep every value only at the place of its first occurrence, remove the repeats and print the resulting array. The order of the elements does not change.
Input
The first line contains a positive integer $n$.
The second line contains $n$ integers — the elements of the array.
Output
Numbers separated by spaces — the array without duplicates.
Note
$1 \le n \le 1000$
the elements are from $-1000$ to $1000$
Examples
Input #1
8 3 1 3 2 1 5 2 3
Output #1
3 1 2 5
Input #2
4 7 7 7 7
Output #2
7