410475: GYM104025 A Gifts in box
Description
There are some gifts in a box. Each gift is a $$$1 \times 1 \times 1$$$ cube. The width, length, and height of the box are $$$n$$$, $$$m$$$, and $$$h$$$ respectively, as shown in Figure 1. The gifts are neatly placed in the box and we can use an $$$n \times m$$$ matrix $$$A$$$ to represent them. If we look at the box from the top there are $$$A_{i,j}$$$ gifts at $$$i$$$-th row, $$$j$$$-th column.
![](https://espresso.codeforces.com/3a6ad2768db0ae84f41c803ed27c175792d5c393.png)
Now we carefully turn the box and make its opening facing to us, as shown in Figure 2. Then we want to use another $$$h \times m$$$ matrix $$$B$$$ to represent the gifts. If we look at the box from the top there are $$$B_{i,j}$$$ gifts at $$$i$$$-th row, $$$j$$$-th column.
![](https://espresso.codeforces.com/72b7b63d1c5935d87aa171e0f00ea2817a34d1b8.png)
The first line contains three integers $$$n, m, h\ (1 \leq n, m, h \leq 100)$$$.
For the next $$$n$$$ lines, each contains $$$m$$$ integers. The $$$j$$$-th integer in the $$$i$$$-th line is $$$A_{i,j}$$$.
OutputOutput $$$h$$$ lines, each contains $$$m$$$ integers. The $$$j$$$-th integer in the $$$i$$$-th line is $$$B_{i,j}$$$.
ExampleInput3 4 5 1 2 3 4 2 0 1 5 1 3 2 2Output
3 2 3 3 1 2 2 3 0 1 1 2 0 0 0 2 0 0 0 1Note
You should take gravity into consideration.