#C10736. Word with Maximum Vowels
Word with Maximum Vowels
Word with Maximum Vowels
You are given several test cases. In each test case, you are provided with a line containing a series of words separated by spaces. Your task is to determine, for each test case, the word that contains the maximum number of vowels. If multiple words have the same number of vowels, output the one that appears first in the test case.
Note: Vowels are defined as \(a, e, i, o, u\) and this check is case-insensitive.
inputFormat
The first line of input contains an integer \(T\) indicating the number of test cases. Each of the following \(T\) lines contains a test case: a series of words separated by spaces.
For example:
2 hello world this is a test programming is fun
outputFormat
For each test case, output a single line that contains the word with the maximum number of vowels.
For the sample above, the correct output is:
hello programming## sample
1
hello world this is a test
hello
</p>