#P661H. Rotate Matrix

Rotate Matrix

Description

You are given a square matrix of integer numbers. Rotate it 90 degrees clockwise (see examples for clarification of rotation).

The input consists of n lines (1 ≤ n ≤ 10, n is not given explicitly). Each of the lines contains n space-separated integers; j-th integer in i-th line corresponds to matrix element mij (1 ≤ mij ≤ 100).

Output the rotated matrix in the same format as the input.

Input

The input consists of n lines (1 ≤ n ≤ 10, n is not given explicitly). Each of the lines contains n space-separated integers; j-th integer in i-th line corresponds to matrix element mij (1 ≤ mij ≤ 100).

Output

Output the rotated matrix in the same format as the input.

1 2 3<br>4 5 6<br>7 8 9<br>
1 2 3 4<br>5 6 7 8<br>9 10 11 12<br>13 14 15 16<br>
7 4 1<br>8 5 2<br>9 6 3<br>
13 9 5 1<br>14 10 6 2<br>15 11 7 3<br>16 12 8 4<br>