12981298 SUSTech Online Judge
Problem 1298 --Pisces and the dragon

## 1298: Pisces and the dragon

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 119  Solved: 37
[Submit][Status][Web Board]

## Description

The brave Pisces is going to fight with the evil dragon! Since the dragon is very powerful, Pisces decides to take some useful items with him. Items are divided into different kinds, and each item has a number representing the value of it. 2 items with the same value are considered of the same kind. However, Pisces's backpack is not large enough, so he has to take only one item of each kind. Please help Pisces to find which items shall he take, and print the values of chosen items in ascending order.

## Input

The first line contains an integer $$T(1\leq T\leq100)$$, which denotes the number of test cases.

In each test cases, the first line contains one integer $$n(1\leq n\leq 10^3)$$ indicating the number of items. And in the second line there are $$n$$ integers $$a_1,a_2,a_3,...,a_n(1\leq a_i\leq10^6)$$ which represents the value of each item.

## Output

For each test case, print the values in ascending order.

## Sample Input

1
6
1 4 3 2 2 5

## Sample Output

1 2 3 4 5

[Submit][Status]