On his birthday, Almas was given a n×n(1≤n≤500) matrix of natural numbers up to 500 and instructions for it. The instruction consisted of symbols L and R, where if the symbol L is given you need to rotate the matrix 90 degrees to the left, and for the symbol R you need to rotate the matrix 90 degrees to the right. The instruction was only 3 characters in length so Almas could handle the twists with ease. Your task is to display the matrix that Almas had at the end of these turns.
Input
The first line consists of one integer n - the size of the matrix.
In the next n lines, you are given n integers. Numbers can range from 1 to 500.
Output
Output the final matrix n×n.
Note
Important note - you should not print any whitespace or newline if it is not necessary.
-