n=int(input())  
lis=[]
for i in range(n):
    wd=input()
    lis.append(wd)
for _ in sorted(lis):
    print(_)