by@yamayu832
AC
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
3445034881266662496441058647497828452778025237468713419893828127816447446830915352033161104487829118
0000001111111111112222222222333333333444444444444444445555556666666666777777777888888888888888999999