n = int(input())
strlist =[]
for _ in range(n):
    strlist.append(input())

res = sorted(strlist) # sorted 使用

for i in res:
    print(i)