Var b:array[0..1000,0..1000] of int64; a,c:array[0..1000,0..1000] of char; m,n:int64; s:ansistring; i,j:longint; Begin assign(input,'MINES.inp');reset(input); assign(output,'MINES.out');rewrite(output); readln(n,m);
fillchar(b,sizeof(b),0); for i:=1 to n do begin for j:=1 to m do begin read(a[i,j]); if a[i,j]='*' then begin inc(b[i,j-1]); c[i,j]:='*';