LearnPy Hub
← Dictionaries problems
Medium

Top Scorer

Read n lines name score. Print the name with the highest score and the score (the first one read if tied).

Input

n, then n lines.

Output

One line.

Sample 1

Input
3
Mim 80
Rafi 95
Sara 95
Output
Rafi 95

Sample 2

Input
1
A 1
Output
A 1
solution.py
Output appears here
Top Scorer · Python practice problem · LearnPy Hub