Arabiska
InterviewTime limit1sMemory limit1024 MB
Given a short sentence, remove every vowel that is followed by two or more consonants and print the words in reverse order.
- Level
Medium4 of 10
- Topics
- String, Implementation, Simulation, Greedy
- Solved
- No attempts yet
Problem
It is fairly well known that when writing text in Arabic, one writes from right to left. It is less well known that short vowels are never written out.
By vowels we mean one of the letters a, e, i, o, u, y. A short vowel is defined in this problem as a vowel followed by two or more consonants.
Write a program that shows what a sentence would look like if it were written in Arabic, that is, from right to left and omitting all short vowels from the original sentence.
Input
The first line contains an integer (), the number of words in the sentence.
The second line contains words, where each word consists of at most 10 lowercase letters from the Latin alphabet (a to z).
Output
Print words: what the sentence would look like written in Arabic.