You are given a square grid of integers with n rows and n columns. Print the grid after rotating it 90 degrees clockwise.
Under a clockwise quarter turn, the top row of the input becomes the rightmost column of the output, the leftmost column of the input becomes the top row of the output, and in general the value at input row i, column j moves to output row j, column n-1-i (using 0-indexed positions).
Input format
Line 1: an integer n.
Next n lines: each contains n space-separated integers, giving the grid row by row.
Output format
Print n lines, each with n space-separated integers: the grid after the clockwise rotation.
Constraints
- 1 ≤ n ≤ 200
- -1000000 ≤ each grid value ≤ 1000000