n= int(input())
dic = {}
for i in range(n):
    dic[i] = input()
dic = sorted(dic.items(), key = lambda item: item[1])
for k in dic:
    print(k[1])