#P372. 练64.1 图像旋转

练64.1 图像旋转

Description

Input a black and white image with nn rows and mm columns, and output it after rotating 9090 degrees clockwise.

Input Format

First line contains two integers nn and mm, representing the number of rows and columns of pixels in the image. 1n1001 \le n \le 100, 1m1001 \le m \le 100.
Next nn lines, each containing mm integers, represent the grayscale value of each pixel in the image. Adjacent integers are separated by a single space, and each element is between 00 and 255255.

Output Format

Output mm lines, each containing nn integers, representing the image after rotating 9090 degrees clockwise. Adjacent integers are separated by a single space.

Sample

3 3
1 2 3
4 5 6
7 8 9
7 4 1
8 5 2
9 6 3