s="0123456789"while""do n=1+io.read(1)c=s:sub(n,n)io.write(c)s=c..s:gsub(c,"")end