All problems

A Bar Chart With Error Bars

mediumPythonMatplotlibError Bars

Kestrel Freight surveys drivers at each depot and charts the average score per depot. Averages from small samples wobble, so each bar carries a whisker showing how uncertain that depot's estimate is. Before the survey team publishes anything, they want the name of the depot whose estimate is shakiest, because that is the depot that needs more responses rather than more attention.

Task: Print the depot with the largest uncertainty figure.

Input

The first line holds one integer n, the number of depots. Each of the next n lines holds a depot name, its average score and its uncertainty figure, separated by single spaces. Depot names contain no spaces.

Output

One line holding a single depot name, exactly as it was read. The ranking is on the uncertainty figure alone; the average score plays no part. If two depots share the largest uncertainty, print whichever of them appeared first in the input.

Example:

Input:
3
A 10 1
B 20 5
C 15 2

Output:
B

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…