s$="0123456789":do:c$=chr$(peek(0)):n=instr(s$,c$):?str$(n-1);:left$(s$,n)=left$(c$+s$,n)loop