printРабочее место участника

printЗадачи

825. Another Cipher Method

Ограничения: время – 1s/2s, память – 64MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

Sam and Max are passing messages with each other at school hours. In order to the teacher can't read the intercepted message, Sam proposed to write all words in reverse order but keep the right order of letter cases. A word is defined as a consecutive sequence of letters (upper and/or lower case). Other symbols are written as usual.
This cipher method is too complex, and so Max requested for deciphering program.
The input file contains the encoded message (up to 100 lines with length up to 50 symbols).
Write to the output file the decoded message.

Sample Input

Tel em wonk tuoba eht 22dn fo Rebmevon
sa ylkciuq sa uoy NAC.

Sample Output

Let me know about the 22nd of November
as quickly as you CAN.
loading