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