n=int(raw_input()) x = sorted([raw_input() for i in range(n)]) for xi in x: print xi