#A. 土拨鼠进监狱

    Type: Default 1000ms 256MiB

土拨鼠进监狱

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

土拨鼠进监狱了,他需要写出n的全排列才能出狱。

Description

给出n,输出n的全排列。

Format

Input

一行,一个数n

Output

n!n!行,每行是n的一个全排列,按字典序输出。

Samples

3
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1

Limitation

1秒,256mb。n<=8n<=8

我出的题

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
3
Start at
2023-11-29 15:15
End at
2023-11-29 17:15
Duration
2 hour(s)
Host
Partic.
1