#include #include using namespace std; int main() { int w, h; string c; cin >> w >> h >> c; bool k = c == "W"; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { cout << "BW"[k]; k ^= 1; } if (w % 2 == 0) { k ^= 1; } cout << endl; } }