kaisuu = int(input()) for i in range(kaisuu): l = list(map(int, input().split())) set_l = set(l) a = sorted(set_l, reverse=True) for num in a: print(num, end = " ")