We assume the final exam assets you by three problems.
Each problem worth 100 points, so there is 300 points in total.
There are n students in this class, and their student ID are counted from 1 to n.
This problem is sort the students according to the following rules.
1. sort them by the sum of scores of all three problems
2. If there are two students which get same order in rule 1, the one with more scores in the first problem would get higher order.
3. If there are two students which get same order in rule 2, the one with less student ID would get higher order.
In this problem, you are asked to implement a function that compares two students.
The first line contains a integer n.
There are n lines following, each contains the score of the three problems.
Line i of the n lines represent the score of student whose ID is i.
Print the order of the students in terms of student ID.