class unif: def __init__(self,n): self.pare=[-1]*n self.size=[1]*n def root(self,x): while self.pare[x]!=-1: x=self.pare[x] return x def unite(self,u,v): rootu=self.root(u) rootv=self.root(v) if rootu!=rootv: if self.size[rootu]>=self.size[rootv]: self.pare[rootv]=rootu self.size[rootu]+=self.size[rootv] else: self.pare[rootu]=rootv self.size[rootv]+=self.size[rootu] def same(self,s,t): return self.root(s)==self.root(t) H,W=map(int,input().split()) A=[input() for i in range(H)] result=[[0]*W for i in range(H)] for i in range(H): for j in range(W): result[i][j]=A[i][j] Z=unif(H*W) for i in range(H): for j in range(W): if i=4: result[i][j]='.' print(*result[i],sep='')