Result

AC

Code [DL]

a={case[],s->""
case[x],s->" "+x
case[x,*y],s->x+" "+s+a(y,s)}
j={case[]->""
case[x,*y]->x+j(y)}
stdin|map{x->j(sort(split(a(split(a(split(a(split(a(split(a(split(a(split(a(split(a(split(a(split(a(split(x,"0"),"0"),"1"),"1"),"2"),"2"),"3"),"3"),"4"),"4"),"5"),"5"),"6"),"6"),"7"),"7"),"8"),"8"),"9"),"9"))))}|stdout

stdin

6030560572037689543226562672169476247874056524403383948798896037030840355408945620373792196299531706

stdout

0000000000000111222222222233333333333344444444445555555555666666666666677777777777888888889999999999

stderr

strace