for(;a=readline();print(a))for(i in a+a)a=a.replace(RegExp("([^ -"+i%9+"])(.*)"+i%9),i%9+"$2$1")
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page