URI Online Judge | 1827

Square Array IV

By Neilor Tonin, URI BR Brazil

Timelimit: 1

Your work in this program is to read an integer number that is the size of a square matrix (width and height) to be filled as follows: the outer part is filled with 0 in the inner part is filled with 1, the main diagonal is filled with 2, the secondary diagonal is filled with 3 and the central element is 4, as the examples below.

Obs: square with '1' always starts at position size / 3, considering width and height and both begin in 0 (zero).

Input

The input contains a number of test cases and ends with EOF (end of file). Each test case consists of an odd integer number N (5 ≤ N ≤ 101) that is the size of the array. For each test case, print the corresponding array as below. After each test case, print a blank line.

Output

For each test case, print the corresponding array as below. After each test case, print a blank line.

Input Sample Output Sample

5
11

20003
01110
01410
01110
30002

20000000003
02000000030
00200000300
00011111000
00011111000
00011411000
00011111000
00011111000
00300000200
03000000020
30000000002