#include #include #include using namespace std; #define REP(i,a,b) for(i=a;i> w >> h >> a; if(a == 'B') b = 'W'; else b = 'B'; for(i=0;i