Nlogônia's Cipher
The king of Nlogônia has commanded that all important documents be "ciphered", so that only those with knowledge of the cipher can read them (to cipher a document means to alter the original by modifying the letters according to a particular cipher algorithm).
The king has decreed that the following algorithm should be used to cipher the documents:
- Each consonant should be replaced by exactly three letters, in the following sequence:
- the consonant itself (we'll refer to this as the original consonant);
- the vowel closest to the original consonant in the alphabet, with the additional rule that if the original consonant is equidistant from two vowels, then the vowel closest to the start of the alphabet is used. For example, if the original consonant is d, the vowel to be used is e, as this is the closest vowel; if the original consonant is c, the vowel to be used is a, because c is equidistant from a and e, and a is closer to the start of the alphabet.
- the consonant that follows the original consonant, in the order from the start to the end of the alphabet. For example, if the original consonant is d, the consonant to be used is f. If the original consonant is z, the letter z itself should be used.
- Vowels are not altered.
In this task, the alphabet is
and the vowels are
For example, the cipher of the word “ter” is “tuveros” (tuv-e-ros) and the cipher of the word “paz” is “poqazuz” (poq-a-zuz). The king of Nlogônia is seeking someone who can write a programme that produces the cipher of a given word. Can you assist him?
Input
The first and only line of the input contains a word P made up of lowercase unaccented letters.
Output
Your programme should produce a single line, containing the ciphered word.
Constraints
- The word has at least one and at most 30 letters, all lowercase and unaccented.
Input Samples | Output Samples |
---|---|
ter
|
tuveros
|
rei
|
rosei
|
arteiro
|
arostuveiroso
|