Pari loves spiderman and how he hangs upside down from the ceiling, so she likes to rotate everything. Right now she is rotating tables of letters. She wrote an table onto a piece of paper. She has also chosen an angle , a multiple of , and wants to rotate her table that many degrees clockwise.
It turns out this task is a bit too hard for Pari, so help her out.
The first line contains two integers and , the number of rows and columns in Pari's table.
Each of the next lines contains one row of Pari's table, a string of lowercase letters. The last line contains an integer , a multiple of between and (inclusive).
Output Pari's table rotated degrees clockwise. The output must contain the smallest number of rows and columns possible. Some rows may have some leading spaces, but extra leading or trailing space is now allowed.