Problems
Spiral
Spiral
Print the two dimentional array of size n × n, filled with the numbers from 1 to n2
by spiral. The spiral of numbers starts at left upper corner and rotates clockwise.
Input
One number n (1 ≤ n ≤ 10).
Output
Print n2
numbers - the array filled by spiral.
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