#include using namespace std; int main(){ int H,W; cin>>H>>W; vector val(W,0); for(int i=0;i>c; val[j]=(val[j]+(2-(i%2))*(c=='o'))%3; } } for(int i=1;i