Rearrange_input problem

the user has to ask the input and rearrange the number in all possible ways for eg:-
806
608
680
860
068
086