def merge(a, b): i = 0 j = 0 c = [] while i < len(a) and j < len(b): if a[i] < b[j]: c.append(a[i]) i+=1 elif a[i] > b[j]: c.append(b[j]) j+=1 c.extend(a[i:]) c.extend(b[j:]) return c def merge_sort(a, l, r): if r - l <= 1: return a[l:r] m = (l + r) // 2 left = merge_sort(a, l, m) right = merge_sort(a, m, r) res = merge(left, right) return res def sim(a): return merge_sort(a, 0, len(a)) while True: try: a = [] n = int(input()) e = list(map(int, input().split())) e = set(e) #print(set(e)) e = list(e) #print(e) e = sim(e) e = map(str, e) e = ' '.join(e) print(e) except: break