t,*s=input() while[print(end=t)]:c=s[0];t=str(int(t)+(c>t)-(c<t));s=s[t==c:]
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page