Ygritte says "Jon knows nothing". But Jon knows something. She gives a chance to Jon to prove it. She gives a string S to Jon and ask him to sort it in the following manner. Sorted string must contain a vowel as first letter and a consonant as next letter and so on OR a consonant as first letter and a vowel as next letter and so on, depending on the string. If there is no vowel left then print the remaining consonant in ascending order and vice versa. Help Jon to prove that he knows something.
Note: Order of vowel must be a->e->i->o->u and order of consonant must be b->c->d... and so on.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a string S as input.
For each test case, in a new line print the sorted string.
In 1st test case
'a' (Vowel) came first so the pattern of sorted string is vcvcvcvc...
For 2nd test case
'b' (consonant) came first so the pattern of sorted string is cvcvcvcv....
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.