This page is still under construction.

Parts of this page are still being built. What you see may change.

Yangjojang of The Year

Time limit1sMemory limit256 MB

Summary
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 TT.

The first line of each test case contains the number of schools NN (1≤N≤100)(1 \le N \le 100).

Each of the next NN lines contains a school name SS (1≤∣S∣≤20)(1 \le |S| \le 20) and the amount of alcohol LL (0≤L≤10 000 000)(0 \le L \le 10\,000\,000) that the school drank over the past year, separated by one space. SS is a string of upper and lower case letters with no spaces, and LL 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.

Examples4

  1. Example 1

    Input
    2
    3
    Yonsei 10
    Korea 10000000
    Ewha 20
    2
    Yonsei 1
    Korea 10000000
    
    Expected output
    Korea
    Korea
    
  2. Example 2

    Input
    1
    1
    Solo 0
    
    Expected output
    Solo
    
  3. Example 3

    Input
    1
    2
    korea 5
    Korea 6
    
    Expected output
    Korea
    
  4. Example 4

    Input
    1
    4
    AbcdefghijKlmnopqrst 9999999
    Short 10000000
    Mid 0
    Qqqqqqqqqqqqqqqqqqqq 1
    
    Expected output
    Short