Given an array arr[] which contains data of N nodes of Complete Binary tree in level order fashion. The task is to print the level order traversal in sorted order.

Input:
The first line of the input contains integer T denoting the number of test cases. For each test case, the first line takes an integer n denoting the size of array i.e number of nodes followed by n-space separated integers denoting the nodes of the tree in level order fashion.

Output:
For each test case, the output is the level order sorted tree. Note: For every level, we only print distinct elements.

Constraints:
1 <= T <= 100
1 <= n <= 10^{4}
1 <= arr[i] <= 10^{4}