Print the names and surnames of the students in descending order of their average score. Input data
First, the number of students n is given, then n lines, each of which contains a surname, a name and three numbers (grades in three subjects: mathematics, physics, computer science). The data in the line is separated by a single space. Ratings range from 1 to 5.
Output
It is necessary to print the surname-first name pairs one per line, separating the last name and the name by one space. Display estimates do not need. If several students have the same average scores, they should be displayed in the order specified in the input data.
Sample Input:
3 Markov Valeriy 5 5 5 Sergey Petrov 1 1 1 Petrov Petr 3 3 3 Sample Output:
Markov Valeriy Petrov Petr Sergey Petrov