Question 1
Study the pattern:
Input: apple cat umbrella dog
Output: apple umbrella cat dog
Now, what will be the output for:
Input: dog cat ball ice
The machine applies 'vowel_first' rule.
dog cat ball ice → ice dog cat ball
dog cat ball ice → ice dog cat ball