#K40867. Find Top Student

    ID: 26738 Type: Default 1000ms 256MiB

Find Top Student

Find Top Student

You are given a list of students along with their scores in three subjects: Mathematics, Chemistry, and Physics. Your task is to determine the student with the maximum total score. The total score is computed as (\text{Mathematics} + \text{Chemistry} + \text{Physics}). In case of a tie, the student who appears first in the input should be considered the top student.

The problem requires reading input from standard input (stdin) and outputting the result to standard output (stdout).

inputFormat

The first line contains an integer (n) representing the number of students. Each of the following (n) lines contains a student's name followed by three integers, which are the scores in Mathematics, Chemistry, and Physics respectively. The values are space-separated.

For example:

3 Alice 90 85 82 Bob 88 89 95 Charlie 95 90 85

outputFormat

Output the name of the student with the highest total score. If there is a tie, output the name of the student who appears first in the input.## sample

1
Alice 90 85 82
Alice

</p>