n=int(input()) mystr=[] for _ in range(n): s=input() mystr.append(s) mystr.sort() [print(i) for i in mystr]