L. Multimino
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

Let's define an $$$n$$$-mino as a connected figure composed of $$$n$$$ squares $$$1 \times 1$$$. Let's say that two $$$n$$$-minoes are equal if one of them can be translated into another using the operations of parallel transport, rotation and reflection.

For example, in the illustration below, the red hexamino (number $$$2$$$) is equal to the orange hexamino (number $$$1$$$), and they both aren't equal to the green hexamino (number $$$3$$$).

You are given a number $$$n$$$. Cut a checkered board of size $$$n \times n$$$ squares into $$$n$$$ pairwise distinct non-intersecting $$$n$$$-minoes or report that no such splitting exists.

Input

The only line of the input contains a single integer $$$n$$$ ($$$1 \leqslant n \leqslant 100$$$).

Output

Output a single integer $$$-1$$$ if the required splitting does not exist.

Otherwise, let's enumerate $$$n$$$-minoes with natural numbers from $$$1$$$ to $$$n$$$. Output $$$n$$$ rows with $$$n$$$ integers in each row corresponding to the splitting of the board into $$$n$$$-minoes according to the principle that a cell in the $$$i$$$-th column and $$$j$$$-th row belongs to $$$n$$$-mino number $$$a_{ij}$$$ ($$$1 \leqslant a_{ij} \leqslant n$$$).

All $$$n$$$-minoes in the splitting must be connected and pairwise distinct from each other. If there are several correct splittings for a board, output any one of them.

Examples
Input
5
Output
4 4 2 2 2 
4 4 4 2 3 
5 5 1 2 3 
5 1 1 3 3 
5 5 1 1 3 
Input
4
Output
-1
Note

In the first example, the splitting looks like the picture on the left.

In the second example, the picture on the right would not be a valid splitting because the lilac (top) and turquoise (bottom) $$$n$$$-minoes can be translated into each other by parallel transport, rotation, and reflection. Therefore, they are equal.