시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 99 54 45 54.878%

문제

민우는 학창시절 승부욕이 강해서 달리기를 할 때에도 누가 가장 빠른지를 중요하게 생각하고, 시험을 볼 때에도 누가 가장 성적이 높은지를 중요하게 생각한다. 이번에 반에서 키를 측정하였는데, 민우는 마찬가지로 누구의 키가 가장 큰지 궁금해한다. 민우를 도와 가장 키가 큰 사람을 찾아보자.

입력

입력은 여러개의 테스트케이스로 구성되어있다. 각 테스트케이스는 첫 번째 줄에 학생의 수 N (0 < N ≤ 50)이 주어지고, 이어서 N개의 줄에 각 학생의 이름과 키가 공백으로 구별되어 주어진다. 학생의 키는 소숫점 이하 2자리까지 주어진다. N이 0으로 주어지는 경우 프로그램을 종료한다.

출력

각 테스트케이스에 대해, 가장 키가 큰 학생의 이름을 출력한다. 같은 키의 사람이 여러명 일경우 모두 출력해야 하며, 순서는 입력으로 들어온 순서를 유지해야 한다.

예제 입력 1

3
John 1.75
Mary 1.64
Sam 1.81
2
Jose 1.62
Miguel 1.58
0

예제 출력 1

Sam
Jose
W3sicHJvYmxlbV9pZCI6IjExMjkyIiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVkMGE0IFx1ZDA3MCBcdWMwYWNcdWI3OGMiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YmJmY1x1YzZiMFx1YjI5NCBcdWQ1NTlcdWNjM2RcdWMyZGNcdWM4MDggXHVjMmI5XHViZDgwXHVjNjk1XHVjNzc0IFx1YWMxNVx1ZDU3NFx1YzExYyBcdWIyZWNcdWI5YWNcdWFlMzBcdWI5N2MgXHVkNTYwIFx1YjU0Y1x1YzVkMFx1YjNjNCBcdWIyMDRcdWFjMDAgXHVhYzAwXHVjN2E1IFx1YmU2MFx1Yjk3OFx1YzljMFx1Yjk3YyBcdWM5MTFcdWM2OTRcdWQ1NThcdWFjOGMgXHVjMGRkXHVhYzAxXHVkNTU4XHVhY2UwLCBcdWMyZGNcdWQ1ZD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