622 - CS135501_I2P2014_LAB_5_from_my_father,_the_king Scoreboard

Time

2014/10/27 16:00:00 2014/10/27 17:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
10171 Chinese Words

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 :

  1. You have to rewrite an article from right top to left down.
  2. 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.

Sample Input  Download

Sample Output  Download

Tags




Discuss