시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 109 60 51 55.435%

문제

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

입력

입력은 여러개의 테스트케이스로 구성되어있다. 각 테스트케이스는 첫 번째 줄에 학생의 수 N (0 < N ≤ 50)이 주어지고, 이어서 N개의 줄에 각 학생의 이름과 키가 공백으로 구별되어 주어진다. 학생의 이름은 알파벳 대/소문자로만 이루어져 있고, 길이는 10을 넘지 않는다. 학생의 키는 소숫점 이하 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
W3sicHJvYmxlbV9pZCI6IjExMjkyIiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVkMGE0IFx1ZDA3MCBcdWMwYWNcdWI3OGMiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YmJmY1x1YzZiMFx1YjI5NCBcdWQ1NTlcdWNjM2RcdWMyZGNcdWM4MDggXHVjMmI5XHViZDgwXHVjNjk1XHVjNzc0IFx1YWMxNVx1ZDU3NFx1YzExYyBcdWIyZWNcdWI5YWNcdWFlMzBcdWI5N2MgXHVkNTYwIFx1YjU0Y1x1YzVkMFx1YjNjNCBcdWIyMDRcdWFjMDAgXHVhYzAwXHVjN2E1IFx1YmU2MFx1Yjk3OFx1YzljMFx1Yjk3YyBcdWM5MTFcdWM2OTRcdWQ1NThcdWFjOGMgXHVjM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