| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10171 | Chinese Words |
|
Description
In traditional chinese, people write words from right top to left down.
Now you have a grid paper which contains N words. N will not bigger than 4096.
The size of the grid paper is H * W (height * width). The size of H and W are between 1 to 64.
Each grid only write a character.
You have to implement two parts :
- You have to rewrite an article from right top to left down.
- If the word is a space, namely ' ', then you have to skip it.
[Note]The blanks at the left down should be filled with ' '.
Hint:

Input
There are 3 input.
1. The number of characters (N) in the article. 0<=N<=4096
2. The size of the grid paper : H (height) and W (width). 1<=H<=64, 1<=W<=64
3. The contents of the article
Output
Rewrite the article which is height H and width W from right top to left down.
There is a newline at the end of the output.