시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB55372379.310%

문제

The Olympic Games are the most important sporting events in human history. Usually, the Olympic Games are held every four years. However, the 2020 Olympic Games just finished in August 2021 due to the COVID-19 outbreaks.

There are more than 200 nations participating in the Olympic Games. Thousands of athletes around the world compete in various sports. The athletes represent their countries or National Olympic Committees (NOCs) to compete for medals. Therefore, each country or NOC may win medals in the competitions.

There are three types of medals: gold medals, silver medals, and bronze medals. Typically, the gold medals are awarded to the winners of the competitions, and silver medals are awarded to the runner-ups. Most of the bronze medals are awarded to the second runner-ups. However, there can be no second runner-up in some sports. The bronze medals can be awarded in different manners. For example, in a few tournament sports, such as wrestling, boxing, and judo, two bronze medals are awarded to the eliminated semi-finalists.

A country or NOC has a better rank than another country or NOC if one of the following conditions holds.

  1. It wins more gold medals.
  2. It wins the same amount of gold medals, and it wins more silver medals.
  3. It wins the same amount of gold medals and silver medals, and it wins more bronze medals.

Please write a program to find the country or NOC which has the best rank among all countries and NOCs.

입력

The first line of the input contains one positive integer n. Then n lines follow. Each of the following lines contains three non-negative integers g, s, b, and the name of a country or NOC. They are separated by blanks.

출력

Print the name of the country or NOC of the best rank.

제한

  • 1 ≤ n < 300
  • g, s, b ∈ {0, 1, ..., 999}
  • There is only one country or NOC of the best rank.
  • The names of countries and NOCs consist of only printable ASCII characters.
  • The size of an input file does not exceed 3 megabytes.

예제 입력 1

4
22 21 22 Great Britain
27 14 17 Japan
39 41 33 United States of America
20 28 23 ROC

예제 출력 1

United States of America

예제 입력 2

3
999 999 998 Malaysia
999 999 999 Thailand
999 998 999 Indonesia

예제 출력 2

Thailand