A weather station stores its temperature readings, one per node, as a singly linked list sorted in non-decreasing order. Because the sensor sometimes re-reports the same value on consecutive ticks, the same reading may appear in several consecutive nodes. Remove duplicate nodes so that each distinct value survives only once (keep the first node of each run of equal values). Print the resulting readings in order.
Input format
Line 1: an integer n — the number of readings.
Line 2: n space-separated integers, sorted in non-decreasing order — the readings.
Output format
The distinct-in-a-row readings, space-separated, in their original order.
Constraints
- 1 ≤ n ≤ 100000
- -1000000000 ≤ reading ≤ 1000000000
- the readings are given sorted in non-decreasing order