#include <iostream> //cin, cout #include <vector> //vector #include <algorithm> //sort,min,max #include <string> //string #include <ios> //fixed #include <iomanip> //setprecision #include <utility> //swap #include <cstdlib> //abs(int) #include <sstream> //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; }