AT_abc436_b [ABC436B] Magic Square

Description

You are given an odd number $ N $ that is at least $ 3 $ . There is a grid with $ N $ rows and $ N $ columns, where all cells are initially empty. Now, you will write integers in each cell of this grid according to the following procedure. Let $ (i,j) $ denote the cell at the $ (i+1) $ -th row from the top and $ (j+1) $ -th column from the left ( $ 0\leq i

Input Format

The input is given from Standard Input in the following format: > $ N $

Output Format

Let $ a_{i,j} $ be the integer written in cell $ (i,j) $ , and print it in the following format: > $ a_{0,0} $ $ a_{0,1} $ $ \dots $ $ a_{0,N-1} $ $ \vdots $ $ a_{N-1,0} $ $ a_{N-1,1} $ $ \dots $ $ a_{N-1,N-1} $

Explanation/Hint

### Sample Explanation 1 Integers are written in each cell as follows: 1. Write $ 1 $ in cell $ (0,\frac{3-1}{2})=(0,1) $ . 2. Cell $ ((0-1) \bmod 3, (1+1) \bmod 3)=(2,2) $ is empty, so write $ 2 $ there. 3. Cell $ ((2-1) \bmod 3, (2+1) \bmod 3)=(1,0) $ is empty, so write $ 3 $ there. 4. Cell $ ((1-1) \bmod 3, (0+1) \bmod 3)=(0,1) $ is not empty, so write $ 4 $ in cell $ ((1+1) \bmod 3,0)=(2,0) $ . 5. $ \vdots $ ### Constraints - $ 3\leq N \leq 99 $ - $ N $ is an odd number.