Problem1044--4位数排列

1044: 4位数排列

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

任给出4个非0的不同数字,求出由这4个数字组成的所有的4位数。

Input

一行,4个一位数

Output

每行六个四位数,从小到大排列 

Sample Input Copy

3 2 1 6

Sample Output Copy

1236 1263 1326 1362 1623 1632
2136 2163 2316 2361 2613 2631
3126 3162 3216 3261 3612 3621
6123 6132 6213 6231 6312 6321

Source/Category