QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 64 MB Total points: 10

#11027. A Cat on a Keyboard

Statistics

A cat is walking on Ann's computer's keyboard. Ann's keyboard looks as follows:^{1}

problem_11027_1.gif

Ann is quite sure that the text created by the cat contains a deeper meaning, so she is willing to decode it in order to understand this meaning. She is got an idea to number the rows of the keys on the keyboard with digits from 1 to 5 (the topmost row gets number 1 and the bottommost - number 5) and to change each character in the cat's text with the number of row of the key corresponding to it. There is a chance that some interesting number will be a result of such transformation and that Ann's mathematical skills will help her understand the text's meaning more easily.

Write a program that:

  • reads the cat's text from the standard input,
  • transforms the cat's text to the digital form,
  • writes the result to the standard output.

^{1}A picture taken from http://acm.uva.es/p.

Input Format

The first and only line of input contains one sequence of at least 1 and at most 500 000 characters. You can assume that the cat did not step on any of the keys: Alt, BackSpace, Control, Enter, Tab.

Output Format

The first and only line of output should contain a sequence consisting of digits 1, 2, 3, 4, 5, representing the decoded version of the cat's text.

Example

Input

KOT-KTO-TOK KOD.

Output

3221322122353234

Discussions

About Discussions

The discussion section is only for posting: Editorials, General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues. Submitting multiple issues may cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.