#C8040. Remove Duplicates and Sort

    ID: 51979 Type: Default 1000ms 256MiB

Remove Duplicates and Sort

Remove Duplicates and Sort

You are given a list of integers. Your task is to remove all duplicate numbers and then print the resulting list in sorted order. Formally, given a sequence of integers \(a_1, a_2, \dots, a_n\), you need to output the set \(\{a_1, a_2, \dots, a_n\}\) in ascending order.

Example:

Input:
7
4 5 6 4 2 3 2

Output: 2 3 4 5 6

</p>

Make sure to handle edge cases such as an empty list or a list where all elements are the same.

inputFormat

The first line contains an integer \(n\) which represents the number of elements in the list. The second line contains \(n\) integers separated by a single space.

outputFormat

Print the sorted list of unique integers in one line with each number separated by a single space.

## sample
7
4 5 6 4 2 3 2
2 3 4 5 6

</p>