#B. ABC201B - Do you know the second highest mountain?

    Type: Default 1000ms 256MiB

ABC201B - Do you know the second highest mountain?

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Score : 200 points

Problem Statement

The Republic of AtCoder has N mountains. The i-th mountain has a name Si and a height of Ti.

Return the name of the second highest mountain there. It is guaranteed that all the mountains have different names and different heights.

Constraints

  • 2N1000
  • 1(the length of Si)15
  • 1Ti105
  • Si=Sj (i=j)
  • Ti=Tj (i=j)
  • Si consists of uppercase English letters, lowercase English letters, and digits.
  • N and Ti are integers.

Input

Input is given from Standard Input in the following format:

N
S1 T1
S2 T2

SN TN

Output

Print the name of the second highest mountain.


Sample Input 1

3
Everest 8849
K2 8611
Kangchenjunga 8586

Sample Output 1

K2

The second highest mountain in the world is K2.


Sample Input 2

4
Kita 3193
Aino 3189
Fuji 3776
Okuhotaka 3190

Sample Output 2

Kita

The second highest mountain in Japan is Kita-dake.


Sample Input 3

4
QCFium 2846
chokudai 2992
kyoprofriends 2432
penguinman 2390

Sample Output 3

QCFium

ABC201

Not Attended
Status
Done
Rule
IOI
Problem
7
Start at
2023-6-28 8:00
End at
2023-6-28 10:00
Duration
2 hour(s)
Host
Partic.
10