num = int(input())
out = []
for i in range(num):
    s = input()
    out.append(s)
out.sort()
for s in out:
    print(s)