#include using namespace std; #define REP(i,N) for(int i=0;i>W>>H>>C; if(C=='B') D='W'; else D='B'; REP(i,H){ REP(j,W){ if((i+j)%2) cout<