#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; int dp[410][410][410]; const int MOD=998244353; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int h,w; cin>>h>>w; V S(h); rep(i,h) cin>>S[i]; auto f=[&](int i,int j,int k,int l)->bool{ if(i>=h || j>=w || k>=h || l>=w) return false; if(S[i][j]=='#' || S[k][l]=='#') return false; return true; }; dp[1][0][1]=1; for(int i=1;i