IntermediateRating 1100
Rotate the Picture
Rotate an r×c grid of characters 90° clockwise and print it.
Input
r c, then r lines.
Output
c lines.
Sample 1
Input
2 3 abc def
Output
da eb fc
Sample 2
Input
1 1 x
Output
x
Output appears herer c, then r lines.
c lines.
2 3 abc def
da eb fc
1 1 x
x
Output appears here