# 排序加去重 
N = int(input().strip())
while True:
    ranNum = []#记录输入的随机数
    for i in range(N):
        ranNum.append(int(input().strip()))
    ranNum.sort()
    currentNum = ranNum[0]
    print(currentNum)
    for i in range(1,N):
        if currentNum==ranNum[i]:
            continue
        else:
            currentNum = ranNum[i]
            print(currentNum)
    try:
        N = int(input().strip())
    except:
        break