T3. Spiral T#10075

T3. Spiral T

1 second
64 megabytes
Easy

Given integers and (2 \le N, M \le 100), your task is to fill a rectangle with rows and columns using integers from the range [1; N \cdot M]. The numbers should be arranged in a counterclockwise spiral pattern, starting from the bottom right corner.

Output the numbers row by row, with a space separating the numbers within each row.

Input

A single line containing the integers and , separated by a space.

Output

Print the numbers from the range [1; N \cdot M] in the specified spiral order.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading