Testing System#4416

Testing System

3 seconds
128 megabytes
Very easy

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:

Input

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.

Output

Print integers — the team numbers in sorted order.

Examples

Example 1

Loading
Loading