Spiral#5057

Spiral

1 second
122.174 megabytes
Medium (≈1350)

Print a two-dimensional array of size n \times n, filled with the numbers from to n^2 in a spiral order. The spiral starts at the top-left corner and proceeds clockwise.

\InputFileOne integer (1 \leq n \leq 10).

\OutputFilePrint n^2 numbers in spiral order as a filled array.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading