An office door logs every badge scan of the day as a singly linked list of badge IDs, sorted in non-decreasing order (one node per scan). A badge ID that was scanned more than once indicates a scanner glitch. Remove ALL nodes carrying such an ID, keeping only the badge IDs that were scanned exactly once, in their original order. Print the resulting IDs (print an empty line if no ID was scanned exactly once).
Input format
Line 1: an integer n — the number of scans.
Line 2: n space-separated integers, sorted in non-decreasing order — the scanned badge IDs.
Output format
The badge IDs that appear exactly once, space-separated, in their original order (an empty line if none qualify).
Constraints
- 1 ≤ n ≤ 100000
- -1000000000 ≤ badge ID ≤ 1000000000
- the IDs are given sorted in non-decreasing order