a="0123456789";r="" for i in map(int,raw_input()):r+=a[i];a=a[i]+a[:i]+a[i+1:] print r
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page