SP10301 JUMPY - A jumpy cycle

Description

A _cycle_ is a connected undirected graph with _n_ vertices of degree 2. (Special cases: The cycle for _n_ = 2 is a graph with two vertices and two parallel edges between them. For _n_ = 1 the cycle is a graph with a single vertex and a loop. In all cases, you can imagine the cycle as a circle passing through _n_ locations.) The _distance_ _d_ of two vertices is the number of edges on the shortest path that connects them. A _labelling_ of a cycle is a function _f_ that assigns a positive integer to each of its vertices. Given a labelling, we may pick a starting vertex and direction along the cycle and write down the labels in the order in which we encounter them. The _n_-tuple obtained in this way is called a _label list_. There may be multiple label lists corresponding to a single labelling. For example, the label lists (3,8,25,14,17) and (25,8,3,17,14) may come from the same labelling. A labelling is called _jumpy_ if it has the following properties: - No two labels are equal. - For each pair of distinct vertices _u_,_v_ the greatest common divisor of _f_(_u_) and _f_(_v_) is at most _d_(_u_,_v_). (In other words, neighboring vertices must have relatively prime labels, vertices at distance 2 may only have 2 as the common divisor of their labels, etc.) For example, a cycle with the label list (3,8,25,14,17) is a jumpy cycle. The _upper bound_ of a labelling is the largest integer it uses. Given two distinct label lists of a given cycle, look at the first position where they differ. The one with the smaller value on this position is _lexicographically smaller_. Task ---- Given is the number of vertices _n_. Find a jumpy labelling of a cycle with _n_ vertices with the smallest possible upper bound. If there are multiple such labellings, pick the one that can produce the lexicographically smallest label list.

Input Format

Ignore the input.The file's empty, anyway.

Output Format

For each _n_ from 1 to 20 output a single line with a sequence of _n_ positive integers: the lexicographically smallest label list that determines a jumpy labelling with the smallest possible upper bound. Separate the integers by single spaces. (Do not print a space after the last integer on a line.)