#include #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int w, h; string c; cin >> w >> h >> c; REP( i, h ){ REP( j, w ){ string c1 = "BW", c2 = "WB"; cout << ( c == "B" ? c1[(i+j) % 2] : c2[(i+j) % 2] ); } cout << endl; } return 0; }