Problem

9 /19


all-around

Problem

The input of the program is information about the results of school all-around competitions. The all-around consists of competitions in four sports, participation in each of which is assessed by points from 0 to 10 (0 points are received by a student who did not take part in competitions in this sport) . Winners are determined by the highest total score. It is known that the total number of participants in the competition does not exceed 100.
The first line contains the number of students who took part in the competition, N. This is followed by N lines with the following format: 
<Lastname> <Name> <Points> ,
where:
- <Surname> – a string of no more than 20 characters;
- <Name> – a string of no more than 15 characters;
- <Points> - a string containing four space-separated integers corresponding to the points obtained in competitions in each of the four sports.
At the same time, <Surname> and <Name>, <Name> and <Points> separated by a single space.

Input string examples:        
Ivanova Maria 5 8 6 3
Petrov Sergey 9 9 5 7

Write a program that will display the last names and first names of the three best all-around competitors. If among the other participants there are students who scored the same number of points as one of the top three, then their names and surnames should also be displayed. In this case, the names and surnames can be displayed in any order.