50131. Mark Syllables

I'm a slow walker, but I never walk backwards.

Task Description

We want to mark two specific syllables in a word from input. In this task, we define a syllable as a sequence of zero or many consonants followed by a vowel. Note that this is by no means the actual definition of syllables in English, and we simply use the word syllable for our convenience.

syllables in the wordsyllables in the word

Take the word computers as example. We first look for all vowels (a, e, i, o, and u) in the word, and group all the consonants in front of a vowel as a syllable. In this case, computers has three syllables. The first syllable is co, the second syllable is mpu, and the third syllable is te. The syllables are indexed from 0. The consonants at the end of a word (rs in this case) is not considered a syllable.

We use two non-negative integers i and j to indicate two important syllables in a word. The first line of the output will be the i-th syllable, and plus symbols + for all other letters. The second line is the same except that we emphasize the j-th syllable. Any characters not in the i-th or the j-th syllables will be in the third line. For example if the word is computers and i is 2 and j is 1, then the output will be as follows. The first line has only the syllable te. The second line has the syllable mpu. The third line has letters not in these two syllables. Note that all three lines has the same length since we will put + in the output.

put syllables to differnt linesput syllables to differnt lines

Input Format

The input has multiple lines and you must process them until EOF. Each line has a word of k letters and two syllable indices. k is at least 3 and no more than 10000. Every word has at least three syllables. It is guaranteed that the two indices are valid, and are not the same.

Output Format

For each line of input the output has three lines as described in the task.


  • 10 points: Every letter is a vowel.
  • 20 points: Every word has exactly three syllables, and the word ends with a vowel.
  • 70 points: There may be more than three syllables and there may be consonants at the end of a word.

Sample Input 1

aei 0 1
aeiou 1 4

Sample Output 1


Sample Input 2

terrible 2 0

Sample Output 2


Sample Input 3

computers 2 1
conservation 3 0

Sample Output 3