Given a positive integer n, print all permutations of the integers from 1 to n in lexicographical order.
One positive integer n(1≤n≤8).
Print all permutations of the integers from 1 to n in lexicographical order. Print each permutation on a separate line.