JDCC '16 Contest 1 P1 - Euler

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

"In mathematics, theorems are named after the second person to discover them, for the first is always Euler."

Leonhard Euler was a brilliant mathematician who made significant advancements in many areas of math and science, and hence has a lot of things named after him. In this problem, you will figure out whether Euler was the first one to discover a theorem.

Input

A test case begins with an integer N (1 \le N \le 1000). N lines follow, each containing a person's name S and a year Y, which means that person S discovered the theorem in year Y. No two people will discover a theorem in the same year.

Output

Output the name of the first person to discover the theorem.

Sample Input

2
Euler 1750
Gauss 1800

Sample Output

Euler

Sample Input

3
Gauss 1812
Fermat 1614
Euler 1730

Sample Output

Fermat

Sample Input

5
Weierstrass 1858
Cantor 1902
Euler 1743
Tilikaynen 2016
Raza 2012

Sample Output

Euler

Comments

There are no comments at the moment.