Write a program that, given a number , prints all the words that are a permutation of the first lowercase letters, with one restriction: there cannot be two letters and such that is immediately to the right of in the word and is the letter following in the alphabet.
Input consists of a natural number between 1 and 9.
Print in order and one per line all the words that satisfy the restriction.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T12:19:18.851Z
© Jutge.org, 2006–2026.
https://jutge.org