import sys
c=0
cc=0
l=[]
for line in sys.stdin:
    cc+=1
    item=int(line.strip())
    if c==0:
        c=item
        cc=0
    else:
        if item in l:
            pass
        else:
            l.append(item)
    if cc==c:
        c=0
        l=sorted(l,reverse=False)
        for i in l:
            print(i)
        l.clear()