From one to en (1)

Write program that prints all the permutations of {1,,n}\{ 1, \dots, n \} for a given nn.

Input

Input consists of a natural number n>0n > 0.

Output

Print all the permutations of {1,,n}\{ 1, \dots, n \} in lexicographical order.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:39:08.416Z

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