4774 - dfs模板 没有重复的全排列

从p个数字里面选取n个的没有重复的全排列1<p<6,1<n<p;

Input

Output

Examples

Input

4 2

Output

12
13
14 
21
23 
24 
31
32
34
41
42
43
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题