eolymp
bolt
Try our new interface for solving problems
Problems

Spiral

Spiral

Time limit 1 second
Memory limit 122 MiB

Print the two dimentional array of size n × n, filled with the numbers from 1 to n^2 by spiral. The spiral of numbers starts at left upper corner and rotates clockwise.

Input data

One number n (1n10).

Output data

Print n^2 numbers - the array filled by spiral.

Examples

Input example #1
1
Output example #1
1
Input example #2
2
Output example #2
1 2
4 3
Input example #3
3
Output example #3
1 2 3
8 9 4
7 6 5