T9. Spiral TTT#10081

T9. Spiral TTT

1 second
64 megabytes
Easy

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

Output the numbers row by row, with a space separating each number within a 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