import sys

data=sys.stdin.readlines()
data=data[1:]
for i in range(len(data)):
    data[i]=int(data[i][-7:-1])
data.sort()
for item in data:
    print(item)