A telemetry pipeline replays a stream of n integer event codes, some of which repeat. Produce a cleaned stream that keeps only the first occurrence of each event code, in the original order, discarding every later repeat.
Input format
Line 1: an integer n.
Line 2: n space-separated integers (the event codes, in the order they occurred).
Output format
The cleaned stream: the distinct event codes in order of first appearance, space-separated on a single line.
Constraints
- 1 ≤ n ≤ 100000
- -1000000 ≤ each event code ≤ 1000000