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.
Input
3
Output
acb bac cba
Input
4
Output
acbd adcb badc bdac bdca cadb cbad cbda dacb dbac dcba