Under construction

Still being built. Things may change

Zakat

Time limit2sMemory limit1024 MB

Summary
Given each player's demanded salary, surname, and citizenship, find the surname of the Russian player with the highest salary.
Level

Easy2 of 10

Topics
Array, Implementation
Solved
No attempts yet

Problem

After long negotiations, the management of FC Zakat signed Bruce Banner. As befits a world football star, he earns a considerable salary.

One of the team's former players did not like this, and a wave of raise demands looked unavoidable. After some thought, coach Chulano Spaghetti found a way to solve the problem.

Zakat has nn players in total. Some hold Russian citizenship, and the rest are legionnaires. The coach handles legionnaires' demands with caution and prefers to raise their salaries so as not to lose a valuable player. Russian players, on the other hand, are pushed to lower their demands as follows: in the next match, the Russian player who demands the highest salary is left off the lineup. Given each player's surname, citizenship, and the salary they demand, determine which player from the team will not take the field.

Input

The first line contains the number of players nn (1≤n≤1001 \le n \le 100). Each of the next nn lines describes one player: the salary the player demands, the surname, and the citizenship, separated by spaces. Surnames and citizenships consist only of Latin letters, both lowercase and uppercase, and are at most 20 characters long. Players with Russian citizenship have <Russia> in the citizenship field. Each demanded salary is a positive number not exceeding 10910^9. It is guaranteed that the team has at least one player with Russian citizenship.

Output

Print the surname of the player who will not take the field. It is guaranteed that exactly one such player exists.

Examples1

  1. Example 1

    Input
    5
    5000000 Banner Brazil
    1000000 Malafeev Russia
    3000000 Denisov Russia
    2000000 Kerzhakov Russia
    4000000 Criscito Italy
    
    Expected output
    Denisov