|
|||
I can't read it!The Chinese writing system was developed about 4000 years ago, and it has changed relatively little since then. It consists of more than 40 thousand characters, where each character means a word or an idea. Spoken Chinese differs very much from region to region, but the written language is mostly the same. Thus writing acts as a unifying common language among the different regions.
Since over one billion people speak Chinese, it is of great practieal importance to have a
program that is capable of translating Chinese text to English. We have developed such a
program, but it is not working perfectly. The problem is that Chinese can be written in
two different ways: either the characters are written from left to right, or they are
written vertically, with the columns going from right to left. The translator program is
confused by these two possibilities: the translated English text is reversed. More
precisely, the words follow each other in a left to right order, as they should, but the
letters in a word go from right to left. Thus instead of the text “ Input Specification
The input contains several blocks of test cases. Each case begins with a line containing an
integer 1 ≤ n ≤ 100 000, the number of lines in this test case. This is
followed by n, lines of text. The length of each line is at most 1000 characters.
The only characters appearing on these lines are the letters
' The input is terminated by a block with n = 0. Output SpecificationFor each test case, you have to output the n lines, with the words reversed. A word is a sequence of characters delimited by spaces, by the start of the line or by the end of the line. The spaces and new line characters have to be printed exactly as they appeared in the input. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |