#include //cin, cout #include //vector #include //sort,min,max #include //string #include //fixed #include //setprecision #include //swap #include //abs(int) #include //stringstream,getline using namespace std; int main() { int W, H; string C; cin >> W >> H >> C; string temp = "BW"; bool flg; if (C != "B") { flg = true; } else { flg = false; } for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cout << temp[flg]; flg = !flg; } cout << endl; if (W % 2 == 0) { flg = !flg; } } return 0; }