Result

AC

Code [DL]

a=()
while read -n 1 c;do a+=($c);done
for((i=0;i<100;i++));do for((j=0;j<99;j++));do k=$((j+1));if [[ ${a[j]}>${a[k]} ]];then t=${a[k]};a[k]=${a[j]};a[j]=$t;fi;done;done
echo $(IFS=;echo "${a[*]}")

stdin

4047549687958457975650312191004643069136536976871735830944517819205332194429983749711226595175134938

stdout

0000000111111111111222222333333333334444444444445555555555556666666677777777777888888899999999999999

stderr

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

strace