Filling the matrix in a spiral#3681

Filling the matrix in a spiral

1 second
64 megabytes
Very easy

Create a program that populates a table with numbers ranging from to M \cdot N, beginning at the top-left corner and spiraling inward in a clockwise direction (refer to the example for clarity).

Input

The first line contains the natural numbers and , which represent the dimensions of the table (1 \leq N,\, M \leq 50).

Output

Output a table filled with numbers in the specified spiral order.

Examples

Example 1

Loading
Loading