#C13937. Top Student Selection

    ID: 43530 Type: Default 1000ms 256MiB

Top Student Selection

Top Student Selection

You are given a list of students with their scores. Your task is to determine the student with the highest score.

If there is a tie, the student who appears first in the input order should be selected. If the list is empty, output None.

More formally, if there are n students, then for each student i (1 ≤ i ≤ n) described by a name and score, you need to output the student name such that:

\[ score = \max_{1 \leq i \leq n}\{score_i\} \]

and if multiple students achieve this maximum score, choose the one which appears first in the input.

inputFormat

The input is read from stdin and has the following format:

  1. The first line contains an integer n (n ≥ 0), the number of students.
  2. Then follow n lines. Each of these lines contains a student's name (a string without spaces) and an integer score, separated by space.

outputFormat

Output the name of the top student to stdout. If the list is empty (n = 0), output None.

## sample
1
Alice 88
Alice