#include #include #include #include #define ALL(x) (x).begin(),(x).end() using namespace std; int main() { int w,h; char c; cin >> w >> h >> c; for(int i = 0;i < h;i++){ for(int j = 0;j < w;j++){ cout << c; c = c == 'B' ? 'W' : 'B'; } cout << endl; if(w % 2 == 0)c = c == 'B' ? 'W' : 'B'; } return 0; }