Printing cool words

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 nn lowercase letters, vv of which are vowels, that can be made up from the xx first letters of the alphabet.

For instance, these are some of the many cool words for n=5n = 5, v=3v = 3 and x=5x = 5:

aabab ababa babaa cecea deeac

Input

Input consists of three natural numbers n>0n > 0, 0vn0 \le v \le n, and 2x262 \le x \le 26.

Output

Print, in alphabetic order, all the cool words with nn lowercase letters, vv of which are vowels, that can be made up from the xx first lowercase letters. Assume that ‘y’ is a consonant.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T11:09:16.294Z

© Jutge.org, 2006–2026.
https://jutge.org