#include #include using namespace std; typedef long long LL; const LL mod=(LL)1e9+7; bool change[100][100][2]; bool ichimatsu[100][2]; string masu[100]; int H,W; int checkICHIMATSU(){ LL res=1; for(int i=0;i>H>>W; for(int i=0;i>masu[i]; for(int i=0;i=0;i--){ for(int b=0;b<2;b++) change[i][j][b]&=change[i+1][j][1-b]; } LL res=1; for(int i=0;i