String Subsequence Game

easy
1. You will be given a String 2. You need to find all the subsequences possible from the given string that begin with a vowel and end with a consonant 3. Return -1, if no such string is possible 4. Input is handled for you 5. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you

Output Format

Print all the subsequences, in lexicographical order, possible from the given string that begin with a vowel and end with a consonant

Constraints

Input is handled for you

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
qawye
Output
ay aw awy
Previous
Sparse Matrix Multiplication
Next
Subarray Range With Given Sum

Related Questions