Young programmer Sasha wrote his first testing system. He was so excited that it successfully compiled that he decided to invite his school friends to his own contest.
However, at the end of the round, it turned out that the system could not sort the teams in the results table. Help Sasha implement this sorting.
Teams are ordered according to ICPC rules:
By the number of solved problems in descending order;
If the number of solved problems is the same, sort by penalty time in ascending order;
If all the previous criteria are equal, sort by team number in ascending order.
The first line contains the number of teams (1 \le n \le 10^5) participating in the contest. In the -th of the following lines, the number of solved problems (0 \le s \le 100) and the penalty time (0 \le t \le 10^5) for the team with number are given.
Print integers — the team numbers in sorted order.
Example 1