n = int(input()) wordList = [] for w in range(n): word = input() wordList.append(word) wordList.sort() for n in wordList: print(n)