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