#K40097. Max Distance Runners
Max Distance Runners
Max Distance Runners
You are given a list of runners along with the distance each runner has covered. Your task is to output the names of the runner(s) who achieved the maximum distance. The order of output must follow the order in which the runners appear in the input.
The input begins with an integer \(n\) representing the number of runners. Each of the following \(n\) lines contains a string (the runner's name) and an integer (the distance covered). If \(n = 0\), no runners are provided and your program should output nothing.
Example:
Input: 3 John 42000 Alice 38000 Bob 42000</p>Output: John Bob
inputFormat
The first line contains an integer \(n\), the number of runners. Each of the next \(n\) lines contains a runner's name and an integer representing the distance covered, separated by spaces.
outputFormat
Output a single line containing the name(s) of the runner(s) with the maximum distance, in the same order as they appear in the input, separated by a single space. If there is no runner, output nothing.
## sample1
John 42000
John
</p>