From one to en (1)

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

Input

Input consists of a natural number n > 0.

Output

Print all the permutations of {1, …, 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
