Problem B
Beekeeper

Bill’s affinity for a word is determined by how many pairs of double vowels it has, where vowels are the letters {a,e,i,o,u,y}. Given a list of words, find the word that has the most pairs of double vowels, as it will be Bill’s favorite word.
Notes:
-
It is guaranteed that there will be a unique correct answer. That is, one word in the list will have strictly more pairs of vowels than all other words in the list.
-
No word in the input will have three or more of the same vowel consecutively, because that would just be too much for poor Bill.
Input
The input will contain multiple test cases, up to
Output
For each case, print Bill’s favorite word. Each output should be printed on its own line.
Sample Input 1 | Sample Output 1 |
---|---|
4 artist engineer beekeeper programmer 3 bookkatt jailaikia yeehaaw 0 |
beekeeper yeehaaw |