All problems

Comparing Means With pointplot

mediumPythonSeabornpointplot

The Ravensworth Group tracks how many prospects reach each stage of its sales process, with several regional figures filed per stage. The review chart marks each stage's average with a single point and joins the points up, so the drop-off reads as a shape rather than as a wall of bars. The meeting opens by naming the weakest stage.

Task: Print the name of the stage with the lowest average value.

Input

The first line holds one integer n, the number of records, where 1 <= n <= 1000. Then come n lines, each holding a stage name and a value separated by a single space. Stage names contain no spaces, and a stage may appear on several lines, once per region that reported it.

Output

One line holding the stage name, spelled exactly as it appears in the input. Stages are compared on the arithmetic mean of their own records, not on any single record. No two stages tie on that mean.

Example:

Input:
4
Awareness 100
Consideration 50
Awareness 80
Purchase 10

Output:
Purchase

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…