실버5 문제
T = int(input()) for _ in range(T): N = int(input()) arr = [] for _ in range(N): a, b = input().split() arr.append([a, b]) arr.sort(key = lambda x:int(x[1]), reverse=True) print(arr[0][0])