A. Baq and the Distances Between Cities
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Baq works for a mobility company in a country with $$$n$$$ cities. His job consists of programming Dijkstra's algorithm to find the shortest distance between two cities through a network of roads, which is modeled as an undirected graph. Unfortunately, Baq's code has many bugs.

Baq thinks it would be much easier if the minimum distance between two cities were equal to the length of the road that connects them. To avoid worrying about whether there is a direct road between two cities, Baq imagines a network of roads where there is a direct road between every pair of cities, that is, a *complete graph*. Additionally, Baq thinks it would look nice if the lengths of the $$$\frac{n(n-1)}{2}$$$ roads were $$$1, 2, \ldots, \frac{n(n-1)}{2}$$$ in some order.

Can you help Baq design his ideal road plan? That is, a network of roads with roads between each pair of cities, such that the lengths of the roads are a permutation of $$$1, 2, \ldots, \frac{n(n-1)}{2}$$$ and that for every pair of cities, the minimum distance between them is equal to the length of the road that connects them.

Baq can settle for not all pairs of cities satisfying the property, but in that case, he will not give you the full $$$100$$$ points for the problem.

Input

A positive integer $$$n$$$, the number of cities.

Output

For each case, write $$$n-1$$$ lines. In the $$$i$$$-th line, write $$$n-i$$$ integers: the $$$j$$$-th integer should be the length of the road between the $$$i$$$-th city and the $$$(i+j)$$$-th city. Each number between $$$1$$$ and $$$\frac{n(n-1)}{2}$$$ must be written exactly once.

Scoring

There are $$$50$$$ cases, with $$$n$$$ between $$$3$$$ and $$$52$$$. Each one is worth $$$2$$$ points.

Let $$$P$$$ be the number of pairs of vertices $$$u, v$$$ in the graph generated by your program such that the minimum distance between $$$u$$$ and $$$v$$$ is equal to the weight of the edge from $$$u$$$ to $$$v$$$. If $$$P = \frac{n(n-1)}{2}$$$, then your submission receives the $$$2$$$ points for that case. If not, your submission receives $$$\frac{3P}{n(n-1)}$$$ points for that case.

Example
Input
5
Output
1 2 4 9
3 5 8
6 10
7