Balanced Food#632

Balanced Food

2 seconds
64 megabytes
Easy

Computer scientists live on pizza. Now the doctors say this is no good. We ought to eat more balanced. So you put your really large pizza onto your table and eat slice-by-slice, carefully watching that the rest of your meal stays where it is — on the table.

Since computer scientists love pizza, their favourite table is shaped like a slice of pizza. However, different people may have different-sized tables. Everyone has their own preference for the number of slices a pizza has to be cut into. However, all agree that the slices must have identical size. Write a program to help the poor pizza lovers!

Input

The input file contains several test cases. Each test case starts with the number of slices the pizza is cut into. Input is terminated by n = 0. Otherwise, 1 \leq n \leq 10. Then follow floating-point numbers , , , , , , , , , specifying the coordinates of the center of the pizza, its radius, and the coordinates of three points , , . They define the three corners of the slice-shaped table in counter-clockwise order, with being the center.

The pizza is a homogeneous two-dimensional circular object. There is always a cut from its center parallel to the -axis towards increasing -values. The remaining pizza stays connected during the whole process, no matter what slices are removed. The distances from to , are equal except for very small rounding errors. Tables are never larger than a half-circle.

Output

For each test case output on a line the ordering of slices, so that during the whole process of eating the pizza it does not fall down from the table. Slices are numbered counter-clockwise starting with directly above the positive -axis.

If several such orderings exist, choose the lexicographically first one.

If no ordering of slices exists so that the pizza does not fall down, output a line containing the word "impossible" instead.

Examples

Example 1

Loading
Loading

Note

A connected, rigid, flat object remains fixed on a convex, flat surface if and only if the object's center of gravity lies above the surface. The -coordinate, for example, of the center of gravity of an object can be calculated by . Likewise, the -coordinate can be expressed as . Note that the denominator of these expressions gives the area of .