N=int(input()) b=[] for i in range(N): s=input() b.append(s) b.sort() for c in b: print(c)