#include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string #include //abs(int) #include //swap, pair #include //deque #include //INT_MAX #include //bitset #include //sqrt, ceil. M_PI, pow, sin #include //fixed #include //setprecision using namespace std; int main() { int W, H; char C; cin >> W >> H >> C; string S = "BW"; bool flg; if (C == 'B') { flg = false; } else { flg = true; } for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cout << S[flg]; flg = !flg; } cout << endl; if (W % 2 == 0) { flg = !flg; } } return 0; }