#K10631. Alphabet Permutations
Alphabet Permutations
Alphabet Permutations
Given an integer n satisfying \(2 \leq n \leq 20\), generate all permutations of the first n letters of the English alphabet. The generated permutations must be sorted in lexicographical order. Each permutation is printed on a separate line.
inputFormat
The input is read from stdin and consists of a single integer n.
outputFormat
Output all the lexicographically sorted permutations of the first n letters of the English alphabet. Each permutation should be printed on a separate line to stdout.
## sample2
ab
ba
</p>