문제: https://www.acmicpc.net/problem/10814
import sys
read = lambda : sys.stdin.readline().strip()
ans=[]
for _ in range(int(read())):
a, n = read().split()
ans.append((int(a),n))
for a, n in sorted(ans, key=lambda i: i[0]):
print(a, n)
문제: https://www.acmicpc.net/problem/10814
import sys
read = lambda : sys.stdin.readline().strip()
ans=[]
for _ in range(int(read())):
a, n = read().split()
ans.append((int(a),n))
for a, n in sorted(ans, key=lambda i: i[0]):
print(a, n)