All problems

Adding Depth With a Shadow

easyPythonMatplotlibPie Chart

A client of Calder & Voss wants its slides to match an old house deck, which means the circles are drawn with a soft drop shadow behind them. The shadow is decoration and carries no information whatsoever; it does add a rim of grey that makes the thinnest wedge marginally harder to make out, which is worth knowing before agreeing to it. The caption calls out the weakest category by name.

Task: Print the name of the category with the smallest value. If two or more categories are tied for smallest, print whichever of them appears earliest in the list.

Input

The first line holds an integer n, the number of categories. Each of the next n lines holds a category name, one word with no spaces, then its value, separated by a single space. Values may have decimals. n is at least 1.

Output

One line holding the category name, spelled exactly as it appeared.

Example:

Input:
3
A 50
B 30
C 20

Output:
C

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…