def main(): H,W=map(int,input().split()) L=list() for i in range(H): S=input() L.append(S) mod=10**9+7 dp=dict() M=((H+W)//2) dp=[[[0]*M for i in range(M)] for j in range(M)] for k in range(M-1,-1,-1): #k:距離 for i in range(k+1): for j in range(k+1): a=i b=k-i c=H-1-j d=W-1-(k-j) if 0<=a