In the year 2100, the results of the JC2 prelim examinations are finally out and the school is getting a huge headache trying to rank all the students. Due to a huge inflation in educational qualifications, students take a lot of subjects to obtain a good portfolio and all the marks are making the teachers go crazy. You are to create a program to help solve the teachers' dilemma.
There are a total of N students taking S subjects each. The students are ranked according to the following four aspects in order of priority.
- Mean subject score
- Highest subject score
- Median subject score
- Input order
See the sample input if unclear
The first line of input consists of 2 integers: N and S.
The following N lines contain S integers between 0 and 100 inclusive with the integers on the ith line representing the scores of student i
On the ith line, output the student number that is ranked ith based on the ranking above
Subtask 1 (0%): Sample
Subtask 2 (50%): 0 < N,S ≤ 1000
Subtask 3 (50%): 0 < S ≤ 100 and 0 < N ≤ 50000
Sample Input 1
Sample Output 1