#K65732. Unique List Elements
Unique List Elements
Unique List Elements
Given an array of elements, your task is to output the unique elements in the order of their first appearance. The array may include both integers and strings.
The input starts with an integer \(n\) (\(0 \leq n \leq 1000\)) representing the number of elements. The second line contains \(n\) elements separated by a single space. If the array is empty, output an empty line.
Example:
Input: 6\n1 2 3 2 4 1
Output: 1 2 3 4
inputFormat
The first line contains an integer \(n\) — the number of elements in the array. The second line contains \(n\) elements separated by a single space.
outputFormat
Output the unique elements in the order they appear in the input, separated by a single space. If there are no elements, output an empty line.
## sample6
1 2 3 2 4 1
1 2 3 4