#C5937. Unique Sorted Box IDs

    ID: 49641 Type: Default 1000ms 256MiB

Unique Sorted Box IDs

Unique Sorted Box IDs

In this problem, you are given several test cases. Each test case contains a list of box IDs. Your task is to remove duplicate IDs from the list and then sort the unique IDs in ascending order. The sorted unique IDs for each test case should be printed on a separate line with each ID separated by a single space.

For example, if one test case contains the box IDs 3 3 1 2 2, the unique sorted list is 1 2 3.

The mathematical condition for sorting is given by \(a < b\) if integer a is less than integer b.

inputFormat

The input begins with an integer T, the number of test cases. Each test case consists of two lines. The first line contains an integer N that represents the number of box IDs. The second line contains N space-separated integers representing the box IDs.

outputFormat

For each test case, output a single line containing the sorted unique box IDs separated by a single space.## sample

2
5
3 3 1 2 2
4
4 4 4 4
1 2 3

4

</p>