while""do s=""w=io.read()for i=1,#w/3 do a=w while a>""do a,c=a:gsub(a:sub(-1),"")s=c==i and i..s or s end end print(s)end