An observatory ceiling is tiled as an R-by-C grid, each tile bearing an integer id. A cleaning robot scans the tiles in a clockwise inward spiral: it starts at the top-left tile and moves right along the top edge, then down the right edge, then left along the bottom edge, then up the left edge, and continues spiralling inward until every tile has been scanned exactly once.
Print the tile ids in the order the robot scans them.
Input format
Line 1: two integers R and C.
Next R lines: each contains C space-separated integers (one grid row).
Output format
A single line: all R*C tile ids in spiral scan order, space-separated.
Constraints
- 1 <= R, C <= 200
- -1000000000 <= each id <= 1000000000