eolymp
bolt
Try our new interface for solving problems
Problems

Incinerate el

Incinerate el

Time limit 1 second
Memory limit 128 MiB

The galaxy is mired in heresy. Especially it concerns planet Lataros, segmentum Obscurus. Here everything is desecrated and everything should be cleaned. This time, the cleansing flame to the enemies of the Immortal God-Emperor is the latest development of the Adeptus Mechanicus - the tank "Ispepelit el". The Adepta Sororitas reconnaissance squadrons have already discovered all n bases of godly xenos, traitor heretics and insidious mutants. The tank will be dropped into one of the bases, and then must, moving by its own pace, visit all the bases once. Since excessive inert tortuosity is alien to the sons of the Imperium, the tank must go from base to base in a straight line. Of course, having reached the base, the tank will immediately incinerate all the enemies of the Imperium (and el).

Brothers and sisters, your task is to develop a route for the tank. The task is complicated by the fact that the tank leaves behind a deep trench full of glowing napalm, so the route should not be self-intersecting.

Input data

The first line contains the number of bases n (1n10^3). Next n lines contains the base coordinates – the integers not greater than 2 * 10^9.

Output data

Print n integers - the base numbers in the order of their traversal by the tank.

Examples

Input example #1
4
0 0
0 1
1 0
1 1
Output example #1
1 2 3 4