n= int(input()) for i in range(n): A=set(map(int,input().split())) A=sorted(A) A=A[::-1] print(*A)