H,W=map(int,input().split()) S=[list(input().strip()) for i in range(H)] ANS=[["."]*W for i in range(H)] for i in range(H): ind=0 while ind