Embassy#1235

Embassy

1 second
64 megabytes
Easy

Before the final round of a major international programming tournament, participants from all regions of Ukraine gathered in Kyiv to obtain a visa at the US Embassy. It is known that only one official at the American embassy handles interviews with programming contest participants, so it is not surprising that a long queue of participants forms. Each interview with an official lasts exactly one hour. The participants bought their train tickets from Kyiv in advance, and some may miss their trains because they have to wait in the queue. The tournament sponsors are ready to cover the costs for participants who miss their trains to exchange their tickets for new ones.

Your task is to arrange the finalists in a queue so that the sponsor's total expenses are minimized.

Input

Let be the number of finalists, is the number assigned to the finalist in the system, d_i is the latest possible time the -th finalist can start the interview and still catch the train, w_i is the cost of exchanging the ticket for the -th finalist.

The first line contains . The following lines each contain d_i and w_i for the -th finalist.

All numbers in the input are positive integers and do not exceed .

Output

Print the optimal queue that minimizes the sponsor's expenses. In the -th line, print the number of the finalist who stands at position in the queue. If there are several optimal queues, output any of them.

Examples

Example 1

Loading
Loading