Circus Performance
Time limit1sMemory limit1024 MB
Given n acrobats with heights and weights, output an order so every three consecutive acrobats have forward stunt efficiency at least the reverse efficiency.
Problem
There is a very famous circus in the city! The circus has exactly acrobats, and this time they prepared a special show in honor of the SPb Team School Programming Olympiad 2022.
The -th acrobat has height and weight . Any three acrobats can get together and perform an unusual stunt. If acrobats , , and perform a stunt, the efficiency of the stunt is .
The trainer considers an ordered trio of acrobats good if the efficiency of their stunt is no less than the efficiency when they perform in reverse order .
For the final act, the trainer wants to line up all acrobats so that every triple of consecutive acrobats is good. Help him with this difficult task!
Input
The first line contains an integer , the number of acrobats ().
Each of the following lines contains two space-separated integers and , the height and weight of the -th acrobat ().
Output
Print different integers from to , the numbers of the acrobats in the order in which they should be lined up.