This page is still under construction.

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

Help Chelsea!

Time limit1sMemory limit256 MB

Summary
For each test case, print the name of the player with the highest price from the given list.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

When a club cannot produce results, the only answer left is to buy new players. That is the most common strategy in European leagues today, and Rosenborg of Norway is the standard example of a club that made it work. Rosenborg sends scouts all over the world to find promising rookies.

Chelsea is struggling in the Premier League and has finally decided to buy a new player. Tired of waiting for scouts, the club worked out a far more efficient strategy, the saying from Bærum that "if something is for sale, there is a good reason for it". In football that means the most expensive player is the best player.

So the way to find a new player became calling each club and buying its most expensive player. Help Chelsea find the most expensive player on the list.

Input

The first line contains the number of test cases nn (1≤n≤1001 \le n \le 100).

The first line of each test case contains the number of players to consider, pp (1≤p≤1001 \le p \le 100).

Each of the next pp lines contains the price CC and the name of one player, separated by a single space (0≤C<2×1090 \le C < 2 \times 10^9).

  • Within one test case all player prices are different.
  • A player's name is at most 20 characters long and contains no spaces.

Output

For each test case, print the name of the most expensive player on its own line.

Examples5

  1. Example 1

    Input
    2
    3
    10 Iversen
    1000000 Nannskog
    2000000 Ronaldinho
    2
    1000000 Maradona
    999999 Batistuta
    
    Expected output
    Ronaldinho
    Maradona
    
  2. Example 2

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

    Input
    1
    4
    1999999999 Haaland
    5 Odegaard
    7 Berge
    6 Sorloth
    
    Expected output
    Haaland
    
  4. Example 4

    Input
    3
    2
    1999999999 Alpha
    1999999998 Beta
    2
    1999999998 Gamma
    1999999999 Delta
    1
    1999999999 Epsilon
    
    Expected output
    Alpha
    Delta
    Epsilon
    
  5. Example 5

    Input
    2
    2
    1999999 izq1MRk5V0k5aVJdSGA9
    3 Short
    2
    9 zzzz
    8 abcdefghijklmnopqrst
    
    Expected output
    izq1MRk5V0k5aVJdSGA9
    zzzz