Description

考試結束了,老師很想知道班上同學的成績總分與排名,所以老師想請你幫忙寫個程式處理一下,這樣以後每次考試結束後,老師想統計同學的成績與排名就輕鬆了!

The exam is over, and the teacher is eager to know the total scores and rankings of the students in the class. Therefore, the teacher would like to ask for your help to write a program to process this. This way, after each exam, the teacher can easily track the students' scores and rankings!

Input

第一行為數字N (1<=N<=100),代表班上有 N 位學生。

接下來有N行,每行依序為同學的座號、姓名、國文分數、英語分數、數學分數分數(中間均以空白隔開,姓名長度不超過20個字元,姓名只會有英文字母,不會有空白,各科分數為0~100之間的整數)

The first line contains a number N (1 <= N <= 100), which represents the number of students in the class.

The next N lines each represent a student's data, including their seat number, name, scores for Chinese, English, Math (separated by spaces). The name's length does not exceed 20 characters, contains only English letters, and does not contain spaces. The scores for each subject range from 0 to 100.

Output

請輸出按成績總分由高至低排序後的班上成績單。

每行輸出一位同學的資料(依序為座號、姓名、國文、英語、數學、總分、名次)

總分最高者為第1名,若總分相同,則名次相同,例如有兩個最高分,那就有兩個第1名,而下一位同學則為第3名,其餘同理,同名次輸出時,請以座號小的先輸出。

Please output the class report sorted by total scores in descending order.

Each line should contain the data of one student (including seat number, name, scores for Chinese, English, Math, total score, and ranking).

The student with the highest total score is ranked 1st. If two or more students have the same total score, they share the same rank. For example, if there are two students with the highest score, both are ranked 1st, and the next student is ranked 3rd. The ranking continues accordingly. When multiple students share the same rank, please output them in ascending order of their seat numbers.

Sample Input 1

5
1 Apple 30 60 90
2 Banan 50 70 95
3 Curry 90 80 90
4 Donut 80 90 90
6 Judge 90 80 70

Sample Output 1

3 Curry 90 80 90 260 1
4 Donut 80 90 90 260 1
6 Judge 90 80 70 240 3
2 Banan 50 70 95 215 4
1 Apple 30 60 90 180 5

Sample Input 2