Zakat
Time limit2sMemory limit1024 MB
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 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 (). Each of the next 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 . 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.