T8. Spiral TT#10080

T8. Spiral TT

1 second
64 megabytes
Easy

Given integers and , 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 left corner (as illustrated in the examples).

Print the numbers row by row, ensuring there is a space between each number within a row.

Constraints

1 \le N, M \le 100

Input

The input consists of a single line containing the integers and , separated by a space.

Output

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

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading