Your task is to write a program that reads consonants and vowels, and that prints all the words that can be formed using exactly once each one of the given letters. The words have to start in consonant, and must alternate consonants and vowels.
The input consists of a natural between 1 and 5, followed by different consonants and different vowels. The consonants as well as the vowels are given in alphabetical order.
Your program must print all the words that can be formed with the given letters, starting in consonant and alternating consonants and vowels. The words must be written in alphabetical order, one per line. Logically, it is not necessary that the generated words have any meaning.
Author: Salvador Roura
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T12:01:10.501Z
© Jutge.org, 2006–2026.
https://jutge.org