Yangjojang of The Year
Time limit1sMemory limit256 MB
For each test case, print the name of the school with the largest alcohol amount.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
You partied harder than anyone at freshman orientation, so you ended up as the first year class representative.
While planning a joint retreat with another school, you started wondering which of the nearby schools drinks the most.
Given how much alcohol each school drank over one year, print the name of the school with the largest amount.
Input
The first line contains the number of test cases .
The first line of each test case contains the number of schools .
Each of the next lines contains a school name and the amount of alcohol that the school drank over the past year, separated by one space. is a string of upper and lower case letters with no spaces, and is an integer.
Within one test case, no two schools have the same amount.
Output
For each test case, print on one line the name of the school with the largest amount.