Medium
Sort by Second
Read n, then n lines of
name score. Print the names sorted by score from high to low; break ties by name in alphabetical order.Input
n, then n lines.
Output
n lines.
Sample 1
Input
3 Mim 90 Rafi 85 Sara 90
Output
Mim Sara Rafi
Sample 2
Input
1 A 1
Output
A
Output appears here