|
||||||||||
Master of ShuangpinTime 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
Sample Output
Source | ||||||||||
|