do local h,s={},io.stdin:read("*l") for i=0,9 do h[tostring(i)]=0 end for i=1,#s do h[s:sub(i,i)]=h[s:sub(i,i)]+1 end for i=9,0,-1 do local t=tostring(i) if h[t]~=nil then for _=1,h[t] do io.write(t) end end end print() end