h,w=map(int,input().split()) a='yiwiY9' b='9Yiwiy' for i in range(h): s=input() j=0 t=[] while j