#K84847. Unique Sorted List

    ID: 36510 Type: Default 1000ms 256MiB

Unique Sorted List

Unique Sorted List

Given a list of integers, remove all duplicate elements and output the remaining numbers in ascending order.

The input begins with an integer n which indicates the number of elements in the list, followed by n integers separated by spaces.

Mathematically, if the input list is \(A = [a_1, a_2, \dots, a_n]\), you are to compute the sorted unique list \(B = sorted(\{a_1, a_2, \dots, a_n\})\).

It is guaranteed that the list can contain negative numbers as well.

inputFormat

The first line of input contains an integer n (\(0 \le n \le 10^5\)), the number of elements in the list.

The second line contains n space-separated integers.

outputFormat

Output the unique integers in ascending order in one line, separated by a single space. If the list is empty, output an empty line.

## sample
8
4 6 2 6 1 4 8 2
1 2 4 6 8