#C3124. Unique Sorted List

    ID: 46517 Type: Default 1000ms 256MiB

Unique Sorted List

Unique Sorted List

Given a list of integers, your task is to remove duplicate numbers and then sort the resulting integers in non-decreasing order. In other words, if you have a list \(L = [a_1, a_2, \dots, a_n]\), you need to produce a list \(L'\) such that:

\(L' = \text{sorted}(\{a_1, a_2, \dots, a_n\})\)

where the output numbers are separated by a single space. Make sure that your solution reads from standard input (stdin) and writes the result to standard output (stdout).

inputFormat

The first line of input contains an integer \(n\) representing the number of integers. The second line contains \(n\) space-separated integers.

outputFormat

Output a single line containing the unique integers sorted in non-decreasing order, separated by a single space.

## sample
7
4 5 2 2 3 5 1
1 2 3 4 5