Rank the Students
Sort students by marks, highest first. Students with equal marks are listed in alphabetical order of name.
Input
, then lines name marks (names are unique lowercase words).
Output
The sorted list, name marks per line.
Constraints
, marks
Sample 1
Input
4 riya 90 aman 85 zoya 90 kabir 85
Output
riya 90 zoya 90 aman 85 kabir 85