In this problem, we say that a word is cool if it does not have two consecutive consonants. Write a program to print all the cool words with lowercase letters, of which are vowels, that can be made up from the first letters of the alphabet.
For instance, these are some of the many cool words for , and :
aabab ababa babaa cecea deeac
Input consists of three natural numbers , , and .
Print, in alphabetic order, all the cool words with
lowercase letters,
of which are vowels, that can be made up from the
first lowercase letters. Assume that ‘y’ is a
consonant.
Input
3 2 3
Output
aab aac aba aca baa caa
Input
2 1 5
Output
ab ac ad ba be ca ce da de eb ec ed
Input
42 20 26
Output
Input
31 15 2
Output
bababababababababababababababab
Input
2 2 26
Output
aa ae ai ao au ea ee ei eo eu ia ie ii io iu oa oe oi oo ou ua ue ui uo uu