#include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(i,s,e) for (int i = int(s); i < int(e); i++) #define FORIT(i,c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); i++) #define ISEQ(c) (c).begin(), (c).end() int main(){ int W,H; cin >> W >> H; string C; cin >> C; FOR(i,0,H){ FOR(j,0,W){ if(i%2 == 0){ if(C == "B" && j%2 == 0) cout << "B"; else if(C == "B" && j%2 != 0) cout << "W"; else if(j%2 == 0) cout << "W"; else cout << "B"; }else{ if(C == "B" && j%2 == 0) cout << "W"; else if(C == "B" && j%2 != 0) cout << "B"; else if(j%2 == 0) cout << "B"; else cout << "W"; } } cout << endl; } return 0; }