Given a string return all possible subsequences which start with vowel and end with consonant. A String is a subsequence of a given String, that is generated by deleting some character of a given string without changing its order.
Input : 'abc' Output : ab, ac, abc Input : 'aab' Output : ab, aab
First line consists of T test cases. Only line of every test case consists of String S.
Single line output, print all the subsequences in lexicographically sorted, if no subsequence found than print -1.
ab abc abcef abcf abef abf ac acef acf aef af ef
ab abc ac
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.