Pro.ID22105 TitleJavanese Cryptoanalysis Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22105 AC0 Submit0 Ratio- 时间&空间限制描述Javanese is the language of the people in the Central and Eastern parts of the island of Java, Indonesia. In 1926, a standard orthography using the English Alphabet was created for the Javanese language. This writing system uses all letters from A to Z. The ve letters A, E, I, O, and U are vowels, while all other letters are consonants. In Javanese words vowels and consonants always alternate. This property is quite useful when deciphering encrypted Javanese texts. A text s consists of words, each word contains only capital letters. Let's call text s legitimate if in each word of s vowels and consonants alternate (no two vowels and no two consonants are located next to each other). A simple substitution cipher is applied to a text s. That is, a bijection f : A -> A is chosen, where A is the set of capital letters. The encoded text t is obtained from s by substituting each letter c with f(c). You're given the encoded text t. Find any legitimate text s that can be encoded as t, or detect that there is no such legitimate s. 输入The input file contains the encoded text t, a list of words separated by spaces and/or line breaks. Each word consists only of capital letters (A to Z). The input file contains no more than 100000 characters. 输出Description Javanese is the language of the people in the Central and Eastern parts of the island of Java, Indonesia. In 1926, a standard orthography using the English Alphabet was created for the Javanese language. This writing system uses all letters from A to Z. The ve letters A, E, I, O, and U are vowels, while all other letters are consonants. In Javanese words vowels and consonants always alternate. This property is quite useful when deciphering encrypted Javanese texts. A text s consists of words, each word contains only capital letters. Let's call text s legitimate if in each word of s vowels and consonants alternate (no two vowels and no two consonants are located next to each other). A simple substitution cipher is applied to a text s. That is, a bijection f : A -> A is chosen, where A is the set of capital letters. The encoded text t is obtained from s by substituting each letter c with f(c). You're given the encoded text t. Find any legitimate text s that can be encoded as t, or detect that there is no such legitimate s. Input The input file contains the encoded text t, a list of words separated by spaces and/or line breaks. Each word consists only of capital letters (A to Z). The input file contains no more than 100000 characters. Output If the text t cannot be an encoded legitimate text, output only one word impossible. Otherwise, output any legitimate text s that can be encoded into t. Separate words of s with spaces and/or line breaks. All letters in s should be capital. Sample Input Sample #1 Sample Output Sample #1 Source 样例输入Sample #1 样例输出Sample #1 作者 |