a=""m=0 while""do c=io.read(1)if c>" "then d=(a:sub(-1)..a:sub(-51,-51)):match"%d"m=m+0^(d or 0)c=d or m end a=a..c io.write(c)end