Problem9350--CCC '21 J2 - Silent Auction

9350: CCC '21 J2 - Silent Auction

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

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.

Output

Output the name of the person who has won the silent auction.

Sample 1 Input

3
Ahmed
300
Suzanne
500
Ivona
450

Sample 1 Output

Suzanne
The highest bid placed was 500 and it was placed by Suzanne. Suzanne wins the silent auction.

Sample 2 Input

2
Ijeoma
20
Goor
20

Sample 2 Output

Ijeoma
The highest bid placed was 20 and it was placed by both Ijeoma and Goor. Since Ijeoma's bid was placed first, Ijeoma wins the silent auction.

HINT

相同题目:CCC21j2

Source/Category