import os x=18 s=os.read(0,999)+" "*x for c in s:x-=os.write(1,[c,`sum(s[i/3*14+i-x]=="*"for i in range(9))`][c>"*"])