#K12191. Top Student
Top Student
Top Student
You are given a list of students with their scores. Your task is to determine the student or students with the highest score. If there is a tie for the highest score, output the names of all such students in alphabetical order. If the list is empty, output nothing.
More formally, if the scores are given by \( score_1, score_2, \ldots, score_n \), find \( M = \max_{1 \le i \le n} \{score_i\} \) and then output all names such that the corresponding score equals \( M \). If there is exactly one student, output just that name; otherwise, output the names in alphabetical order separated by a space.
inputFormat
The input is read from standard input (stdin) in the following format:
- The first line contains an integer \( n \) which is the number of students.
- The next \( n \) lines each contain a student's name (a string without spaces) and an integer score, separated by a space.
If \( n = 0 \), then it indicates that the student list is empty and no further input is provided.
outputFormat
Print the name of the top student if there is only one. If there are multiple top students, print their names in a single line separated by a single space, sorted in alphabetical order. If there are no students, output an empty line.
## sample3
John 90
Alice 95
Bob 85
Alice