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.
1 \le N, M \le 100
The input consists of a single line containing the integers and , separated by a space.
Output the numbers from the range [1, N \cdot M] in the specified spiral order.
Example 1
Example 2