while True:
try:
s = int(input())
n = []
for i in range(s):
if i <= s:
n.append(int(input()))
m = sorted(list(set(n)))
print('\n'.join(str(i) for i in m))
except:
break
try:
s = int(input())
n = []
for i in range(s):
if i <= s:
n.append(int(input()))
m = sorted(list(set(n)))
print('\n'.join(str(i) for i in m))
except:
break