i=0 for(c)in input():i+=[-1,1][c<"-"];print("0*12345"[i//(i%8<7)],end="")
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page