#include #include #include using namespace std; int main() { int w, h; string c; cin >> w >> h >> c; for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { if ( c == "B") { cout << ((((i + j) % 2) == 0) ? "B" : "W"); } else { cout << ((((i + j) % 2) == 0) ? "W" : "B"); } } cout << endl; } return 0; }