I=input;n=int(I());print(*sorted([I()for i in range(n)]),sep="\n")