100 atcoder#ABC201B. [ABC201B] Do you know the second highest mountain?

[ABC201B] Do you know the second highest mountain?

Score : 200200 points

Problem Statement

The Republic of AtCoder has NN mountains. The ii-th mountain has a name SiS_i and a height of TiT_i.

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

Constraints

  • 2N10002 \leq N \leq 1000
  • 1(1 \leq ({}the length of Si)15S_i) \leq 15
  • 1Ti1051 \leq T_i \leq 10^5
  • SiSj (ij)S_i \neq S_j \ (i \neq j)
  • TiTj (ij)T_i \neq T_j \ (i \neq j)
  • SiS_i consists of uppercase English letters, lowercase English letters, and digits.
  • NN and TiT_i are integers.

Input

Input is given from Standard Input in the following format:

NN

S1S_1 T1T_1

S2S_2 T2T_2

\vdots

SNS_N TNT_N

Output

Print the name of the second highest mountain.

3
Everest 8849
K2 8611
Kangchenjunga 8586
K2

The second highest mountain in the world is K2.

4
Kita 3193
Aino 3189
Fuji 3776
Okuhotaka 3190
Kita

The second highest mountain in Japan is Kita-dake.

4
QCFium 2846
chokudai 2992
kyoprofriends 2432
penguinman 2390
QCFium