Under construction

Still being built. Things may change

Arabiska

Interview

Time limit1sMemory limit1024 MB

Summary
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 NN (1≤N≤51 \le N \le 5), the number of words in the sentence.

The second line contains NN words, where each word consists of at most 10 lowercase letters from the Latin alphabet (a to z).

Output

Print NN words: what the sentence would look like written in Arabic.

Examples3

  1. Example 1

    Input
    4
    hej vad heter du
    
    Expected output
    ud reteh dav jeh
    
  2. Example 2

    Input
    1
    leende
    
    Expected output
    ednel
    
  3. Example 3

    Input
    5
    po ar en trevlig tavling
    
    Expected output
    gnlvt gilvrt ne ra op