while~0:s=input();t=sorted(s);print(*[t.pop(-(c>" "))for c in s[::-1]][::-1],sep="")
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page