Incinerate el#5334

Incinerate el

1 second
128 megabytes
Medium

The galaxy is mired in heresy, especially on the planet Lataros in Segmentum Obscurus. Everything here is desecrated and, as it should be, must be cleansed. This time, the cleansing flame to the enemies of the Immortal God-Emperor will be delivered by the latest development of the Adeptus Mechanicus—the "Ispepelit el" tank. Reconnaissance squadrons of Adepta Sororitas have already discovered all bases of blasphemous xenos, traitorous heretics, and insidious mutants. The tank will be deployed to one of these bases, and then, moving on its own, must visit each of the bases exactly once. Since excessive, aimless winding is alien to the sons of the Imperium, the tank must travel from base to base in straight lines. Of course, upon reaching a 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 filled with blazing napalm, so the route must not intersect itself.

Input

The first line contains the number of bases (1 \leq n \leq 10^3). The next lines contain the coordinates of each base—integers whose absolute values do not exceed 2 \cdot 10^{9}.

Output

Print integers—the base numbers in the order in which the tank should visit them.

Examples

Example 1

Loading
Loading