eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Encrypted SMS

Encrypted SMS

\includegraphics{https://static.e-olymp.com/content/fc/fc0dbcecc56cdd4914b727f22399bea5711333ea.jpg} This year, ACM scientific committee members use emails to discuss about the problems and edit the selected ones. They know that email is not a secure way of communication, especially on such an important topic. So they transfer password-protected compressed file among themselves. In order to send the passwords, they use SMS. To increase the security level, the encrypted passwords are sent by SMS. To do this, a \textit{multi-tap} SMS typing method is used. \textit{Multi-tap} is currently the most common text input method for mobile phones. With this approach, the user presses each key one or more times to obtain the wanted characters. For example, the key \textbf{2} is pressed once to get character \textbf{A}, twice for \textbf{B}, and three times for \textbf{C}. The encryption algorithm that is used is quite simple: to encrypt the \textbf{i}^th character of the password, the key used to obtain that character is tapped \textbf{i} more times. For if the \textbf{4}^th character of password is \textbf{U}, the key \textbf{8} is tapped \textbf{6} times, getting the character \textbf{V}. Note that to make the problem simple, we have assumed that the keypad does not generate digits. The scientific committee needs a program to decrypt the received passwords. They are too busy to write this program and have asked you to help! Write a program to get a correct encrypted text and print the original password. \InputFile The input consists of multiple test cases. Each test case contains a non-empty string of length at most \textbf{100}, consisting of small or capital English letters. The last line of the input contains a single \textbf{#}. \OutputFile For each test case, write the decrypted password in a separate line. Note that passwords are case-sensitive.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
BACE
GgaudQNS
#
Вихідні дані #1
ABCD
IhateSMS
Джерело 32nd ACM International Collegiate, 9th Asian Regional Contest in Iran, December 6-7 2007 (Azar 15-16, 1386)