1413: 全排列

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:2 Solved:2

Description

输入一个自然数N(1<=N<=9),从小到大输出用1~N组成的所有排列,也就说全排列。例如输入3则输出
123
132
213

231

312

321

Input

输入一个自然数N(1<=N<=9)

Output

N的全排列,每行一个

Sample Input Copy

2

Sample Output Copy

12
21

HINT