N = list(map(int, input().split())) parts = [] for count in range(N[0]): part = list(set(map(int, input().split()))) parts.append(part) for i in parts: i.sort(reverse=True) print(i)