2391: Silent Auction

Memory Limit:128 MB Time Limit:1.000 S
Creator:
Submit:4 Solved:4

Description

A charity is having a silent auction where people place bids on a prize without knowing anyone else’s bid. Each bid includes a person’s name and the amount of their bid. After the silent auction is over, the winner is the person who has placed the highest bid. If there is a tie, the person whose bid was placed first wins. Your job is to determine the winner of the silent auction.
一家慈善机构举办了一场无声拍卖,人们在不知道其他人出价的情况下对奖品进行出价。每个出价包括一个人的名字和他们的出价金额。无声拍卖结束后,出价最高的人赢得胜利。如果出现并列,最先出价的人获胜。你的任务是确定无声拍卖的获胜者。

Input

The first line of input contains a positive integer N, where 1 ≤ N ≤ 100, representing the number of bids collected at the silent auction. Each of the next N pairs of lines contains a person’s name on one line, and the amount of their bid, in dollars, on the next line. Each bid is a positive integer less than 2000. The order of the input is the order in which bids were placed.
第一行输入包含一个正整数N,其中 1 ≤ N ≤ 100,代表在无声拍卖中收集到的出价数量。接下来的N对行中,每对行包括一行人的名字和他们的出价金额(以美元计),在下一行。每个出价都是一个小于2000的正整数。输入的顺序就是出价的顺序。

Output

Output the name of the person who has won the silent auction.
输出赢得无声拍卖的人的名字。

Sample Input

3
Ahmed
300
Suzanne
500
Ivona
450

Sample Output

Suzanne

Source/Category