N = int(input()) S = [input() for _ in range(N)] print(*sorted(S), sep='\n')