Problem D
Code Speak
With the AI Overlords always listening, you and your team decide that you need to develop a coded language to speak to one another, something simple so you can understand, but created in a way that LLMs would have trouble with. That’s when you come up with an idea.
You know that LLMs work in tokens, which are pieces of words rather than individual letters, so your code language will consist of inserting an extra syllable, “ib”, before every vowel in a word. In the case where multiple vowels occur in a row, only place “ib” before the first occurrence. For our purposes, ‘y’ does not count as a vowel.
Given a sequence of lowercase words, convert them to your code speak and output the result.
Input
The first line of input will contain a single integer, $n$, ($1 \le n \le 40$).
The following line will consist of $n$ space-separated words, the message that must be converted to code-speak. The words will consist of lowercase english characters only (a-z) and each word will be no more than $40$ characters.
Output
Output the message converted to code speak as $n$ space-separated words on one line, just as in the input.
Explanation of sample output
Before each vowel is placed the letters “ib” in lowercase. Note that the “y” in “byu” does not count as a vowel.
| Sample Input 1 | Sample Output 1 |
|---|---|
4 i love byu hspc |
ibi libovibe byibu hspc |