s=open('../fd/0').read() t='' for x in s:t+=[x,`sum('*'<('.'*18+s)[len(t)+k%3+k/3*17:]<'.'for k in range(9))`]['*'