#P369. 练63.3 迂回方阵

练63.3 迂回方阵

Description

Input an integer NN and output the corresponding square matrix.

Input Format

Input an integer nn, where 1n181 \le n \le 18.

Output Format

A square matrix where each number has a field width of 44.

Sample

5
17  18  19  20  21
10  11  12  13  22
5   6   7  14  23
2   3   8  15  24
1   4   9  16  25