Problem D
Besta gjöfin
Languages
en
is

Sigrún got a lot of presents from all the guests that attended her birthday party today. She has opened all the gifts and noticed that they weren’t equally fun.
She made a list of all the gifts she got, from whom she got each gift and a number denoting how much she enjoyed the gift — the higher the number, the more fun the gift is.
Can you help Sigrún find who gave her the most fun gift?
Input
The first line contains a single integer
Output
Print a single line containing the name of the guest that gave Sigrún the most fun gift.
Scoring
Group |
Points |
Constraints |
1 |
25 |
There are exactly three guests. |
2 |
75 |
No further constraints. |
Sample Input 1 | Sample Output 1 |
---|---|
3 Arnar 10 Bjarki 8 Bernhard 15 |
Bernhard |
Sample Input 2 | Sample Output 2 |
---|---|
2 BjarniJokull 124 GunnarJonas 123 |
BjarniJokull |