Pennant Race

No attempts yetTime limit1sMemory limit128 MB

Problem

The Korea Baseball Organization (KBO) is South Korea's professional baseball league. It was founded with six teams in 1982 and now has eight teams. Each team plays 133 games in the regular season, and the season ends with the championship series known as the Korean Series.

The top four teams advance to the post-season, ranked by winning percentage. In the 2009 season the winning percentage of a team is

winning percentage=ww+l+t\text{winning percentage} = \frac{w}{w + l + t}

where ww, ll, and tt are the numbers of games the team won, lost, and tied. In other words, a tie counts as a loss for percentage purposes (from 2002 to 2007 a tie was treated as a "no game", and before that it counted as half a win and half a loss).

The team with the best record advances directly to the Korean Series, while the other three teams compete for the remaining spot in a step-ladder playoff:

  • Semi-playoff: 3rd place vs. 4th place, best of 5 games
  • Playoff: 2nd place vs. the semi-playoff winner, best of 5 games
  • Korean Series: 1st place vs. the playoff winner, best of 7 games

Given the current standings, determine which team advances directly to the 2009 Korean Series. The best record is guaranteed to be unique.

Input

The first line contains the number of test cases TT (1T201 \le T \le 20).

Each test case begins with a line containing an integer nn (1n101 \le n \le 10), the number of teams in the pennant race. Each of the next nn lines contains a team name BB (a string shorter than 10 characters) followed by three integers ww, ll, and tt separated by spaces: the number of games that team won, lost, and tied (0w1330 \le w \le 133, 0l1330 \le l \le 133, 0t1330 \le t \le 133).

Output

For each test case, print on its own line the name of the team that advances directly to the 2009 Korean Series.