Given a sequence of 32 bit signed integers. Sort this sequence, and remove all repeating elements, i.e. remove all but one copy of each number in the sequence.
The first line contains amount of numbers n (1 ≤ n ≤ 65536) in the sequence. The next n lines contain n integers (one number per line).
Write no more than n numbers, sorted in descending order if n is even, and in ascending order if n is odd. Each number must appear no more than once.