BETA

Submissions : 1694 Accuracy :

36.07

Make a Distinct Digit Array
       

Given an array A[] of n elements.The task is to make a sorted array which will contain all distinct digits present in A[].
 

Input:
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains an integer N, denoting the length of the array. Then in the next line are N space separated integers of the array. 

Output:
For each test case in a new line print the distinct array of digits.

Constraints:
1<=T<=100
1<=n<=200
1<=A[]<=1000


Example:
Input
:
2
3
131 11 48
4
111 222 333 446

Output:
1 3 4 8
1 2 3 4 6

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.