A digital photo frame stores a square N-by-N image as a grid of integer pixel codes. The user taps the rotate button once, which turns the image a quarter turn clockwise (90 degrees to the right).
After a clockwise quarter turn, the pixel that was in row i, column j moves to row j, column N-1-i. Equivalently, the first column of the original (read bottom-to-top) becomes the first row of the result (read left-to-right).
Print the rotated grid.
Input format
Line 1: a single integer N, the side length.
Next N lines: each contains N space-separated integers (one grid row).
Output format
N lines, each with N space-separated integers: the grid after one clockwise quarter turn.
Constraints
- 1 <= N <= 200
- -1000000000 <= each pixel code <= 1000000000