#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(A>N>>M; REP(i,N*M) { char c;cin>>c; ans+=c=='W'; } cout<>T; while(T--)sol(); }