Python 题解

n = int(input())
res = [input() for _ in range(n)]
res.sort()
print('\n'.join(res))