#K52782. Highest Paid Employee

    ID: 29386 Type: Default 1000ms 256MiB

Highest Paid Employee

Highest Paid Employee

Given a list of employees, where each employee is represented as a tuple (id, name, salary), determine the employee with the highest salary. In case of a tie, choose the employee whose name comes first in lexicographical (alphabetical) order. Formally, if we denote an employee's salary by \(s\) and name by \(n\), then among those with the maximum \(s\), the answer is \(\min\{n\}\).

inputFormat

The first line contains an integer n, representing the number of employees. Each of the next n lines contains three values: an integer id, a string name (without spaces), and a floating-point number salary, all separated by spaces.

outputFormat

Output the name of the highest paid employee based on the criteria described above.

## sample
1
1 John_Doe 60000.0
John_Doe