i have a problem to write a logic coding, for example:

i have number 12345 , i wish to have a coding which can give me a result as below:

12345
21345
23145
23415
23451
:
:
: and so on ....... ! can anybody help ?