cnt = int(input()) lists = [] for i in range(cnt): inp = list(map(int, input().split())) print(sorted(set(inp), reverse=True)) inp.clear()