n = int(input().strip())

words = [input().strip() for _ in range(n)]

sorted_word = sorted(words)

for word in sorted_word:
    print(word)