#C9391. Rotate Matrix 90° Clockwise

    ID: 53479 Type: Default 1000ms 256MiB

Rotate Matrix 90° Clockwise

Rotate Matrix 90° Clockwise

You are given an n × n matrix. Your task is to rotate the matrix by 90° clockwise.

The rotation can be mathematically described by the following transformation using \( \LaTeX \):

\( rotated_{j, n-i-1} = matrix_{i,j} \)

You need to read the matrix from standard input, perform the rotation, and print the rotated matrix to standard output. Each row of the output matrix should be printed on a new line, and the numbers in each row should be separated by a single space.

inputFormat

The first line of input contains a single integer n (the size of the matrix). The next n lines each contain n space-separated integers representing the rows of the matrix.

outputFormat

Output the rotated matrix. Each row should be printed on a separate line with its elements separated by a single space.

## sample
1
1
1