G. Surprise Gift
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

Accidentally_Coder, a renowned coder from CSEland, is in a dilemma – she wants to give her friend, The_Author, a special gift. After thinking for a while, she went to her favorite shop at Zindabazar and bought an empty matrix $$$A$$$ of size $$$n \times n$$$. She knows that her friend loves numbers which are power of $$$2$$$. So she decided to fill the matrix in a way that the following conditions hold:

  • For each $$$1 \leq i \leq n$$$, $$$1 \leq j \leq n$$$, $$$A_{i,j}$$$ is an integer and $$$1 \leq A_{i,j} \leq 10^9$$$ holds

  • The sum of numbers in each row is a power of $$$2$$$ (that is, $$${\sum_{j=1}^n A_{i,j}}$$$ should be a power of $$$2$$$ for each $$$1 \leq i \leq n$$$)

  • The sum of numbers in each column is a power of $$$2$$$ (that is, $$${\sum_{i=1}^n A_{i,j}}$$$ should be a power of $$$2$$$ for each $$$1 \leq j \leq n$$$)

  • The sum of numbers in each of the primary and secondary diagonals is a power of $$$2$$$ (that is, $$${\sum_{i=1}^n A_{i,i}}$$$ should be a power of $$$2$$$ and $$${\sum_{i=1}^n A_{i,n + 1 - i}}$$$ should be a power of $$$2$$$)

A number $$$P$$$ is considered a power of $$$2$$$, if there is some integer $$$i$$$$$$(0 \leq i)$$$, for which $$$P = 2^i$$$

Your task is to find any matrix of size $$$n \times n$$$ satisfying these conditions or report that no such matrix exists.

Input

The only line in the input contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$.

Output

If a solution exists, output $$$n$$$ lines, each containing $$$n$$$ integers in range $$$[1, 10^9]$$$, the numbers of the matrix. Otherwise, output $$$-1$$$ on a single line.

Examples
Input
8
Output
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
Input
4
Output
4 4 4 4
4 4 4 4
4 4 4 4
4 4 4 4