A mosaic artist numbers the tiles of an R by C grid by walking a clockwise spiral. Starting at the top-left corner and heading right, they place the numbers 1, 2, 3, ... one per tile, turning clockwise (right, then down, then left, then up, and so on) whenever the next tile would leave the grid or is already numbered, until all R * C tiles are numbered.
Input format
A single line with two integers R and C.
Output format
Print R lines, each with C space-separated integers: the completed grid.
Constraints
- 1 <= R, C <= 100