F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Master of Shuangpin

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 193    Accepted Submission(s): 74


Problem Description
As you know, there are three kinds of Chinese input methods commonly used: Wubi, Pinyin and Shuangpin. With Shuangpin, you can type any Chinese word by pressing keys only twice.



Attention that:

1: For pinyin of length 1, you should repeat it in order to meet the conditions.
2: For those of length 2, just output the original pinyin.
3: For pinyin such as ang, you should press the first character of it and then look up this whole pinyin in the table for the second key.
4: For simplification, there is no character v in any input. We believe that you, a Pinyin master, can tell u and v in any situations such as lve and que, so we do not challenge you here.


OK, now you are already a MASTER of Shuangpin! Please output the keys sequence to type the given sentences. For example, "ni hao shi jie" will be "ni hc ui jp".
 

Input
There are multiple test cases. Each line contains one.

Each line is a sequence of pinyin separated by spaces.

It is guaranteed that the number of test case is no more than 1000, the number of pinyin in one test case is no more than 500, and the number of pinyin in all the test cases is no more than 5000.
 

Output
The keys sequence separated by spaces.
 

Sample Input
rua ni xian qi po lan rang wo men dang qi shuang jiang cha na zhua zhu le wei lai zhe ti mian shen me wan yi ni you ben shi na lai mai a wo e le wo men chi shen me ang yang de dou zhi
 

Sample Output
rx ni xm qi po lj rh wo mf dh qi ul jl ia na vx vu le ww ld ve ti mm uf me wj yi ni yz bf ui na ld md aa wo ee le wo mf ii uf me ah yh de dz vi
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-27 09:33:17, Gzip enabled