All problems

A Primary Bar Metric With a Secondary Rate Line

hardPythonMatplotlibtwinx

Kestrel Freight's sales team logs, per month, how many quotes went out and how many became bookings. The chart shows quote volume as bars and the booking rate as a line on its own scale, because volumes in the thousands and a percentage would be unreadable squeezed onto one axis. The commentary names the month that converted best, which is rarely the month with the most quotes.

Task: Print the month with the best conversion rate.

Input

The first line holds one integer n, the number of months. Each of the next n lines holds a month name, that month's quote count and that month's booking count, separated by single spaces. Month names contain no spaces and every quote count is above zero.

Output

One line holding a single month name, exactly as it was read. A month's conversion rate is its bookings as a share of its own quotes, so a month with few quotes can still rank first. If two months tie on rate, print whichever appeared first.

Example:

Input:
3
Jan 1000 50
Feb 100 40
Mar 500 100

Output:
Feb

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…