Unique Elements in Order
List the distinct array values in first-appearance order.
Input
The first line contains n. The second line contains n integers.
Array and query counts are between $1$ and $10^5$. Integer values are between $-10^9$ and $10^9$. Deleting a missing multiset value has no effect.
Output
Print the distinct values on one line in the order of their first occurrence.
Example
Input
7
4 2 4 6 2 3 6
Output
4 2 6 3
Comments