Sorting#827

Sorting

1 second
128 megabytes
Easy (≈1000)

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.

Input

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).

Output

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.

Examples

Example 1

Loading
Loading