for s in sorted(open(0))[1:]:print(s[:-1])