시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB55344438981.381%

문제

A nasty virus has infected my computer. Its effect has been to attack all my text files and reverse every word in them. Your job in this problem is to write the code to restore my text files to their original condition.

As far as the virus was concerned, a word was any sequence of characters that ended with a space or an end of line character. You will see what I mean when I tell you that the first line in one of my files was:

Get ready for the New Zealand Programming Contest.

The virus turned this into:

teG ydaer rof eht weN dnalaeZ gnimmargorP .tsetnoC

See how it included the full stop with ‘Contest’ and put it before the letters?

입력

Input will consist of a number of lines, each containing up to 250 characters. Words will be separated by single spaces, i.e. not by tabs, double spaces or other characters. Words may be of any length. Input will be terminated by a line containing a single #.

출력

Output will consist of one line for each line of input. In the output line, each word (as defined in paragraph 2 above) in the input line will be reversed.

예제 입력 1

teG ydaer rof eht weN dnalaeZ gnimmargorP tsetnoC no .ht41
I like ice-cream.
#

예제 출력 1

Get ready for the New Zealand Programming Contest on 14th.
I ekil .maerc-eci