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

    ID: 1725 Type: RemoteJudge 2000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>基础语法一维数组基础算法排序结构体

[ABC201B] Do you know the second highest mountain?

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

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

  • 2≤N≤10002 \leq N \leq 1000
  • 1≤(1 \leq ({}the length of Si)≤15S_i) \leq 15
  • 1≤Ti≤1051 \leq T_i \leq 10^5
  • Si≠Sj (i≠j)S_i \neq S_j \ (i \neq j)
  • Ti≠Tj (i≠j)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