On his birthday, Almas was given a () matrix of natural numbers up to and instructions for it. The instruction consisted of symbols and , where if the symbol is given you need to rotate the matrix degrees to the left, and for the symbol you need to rotate the matrix degrees to the right. The instruction was only 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 - the size of the matrix.
In the next lines, you are given integers. Numbers can range from to .
Output
Output the final matrix .
Note
Important note - you should not print any whitespace or newline if it is not necessary.
-