#include <iostream> //cin, cout #include <vector> //vector #include <algorithm> //sort,min,max,count #include <string> //string,getline, to_string #include <cstdlib> //abs(int) #include <utility> //swap, pair #include <deque> //deque #include <climits> //INT_MAX #include <bitset> //bitset #include <cmath> //sqrt, ceil. M_PI, pow, sin #include <ios> //fixed #include <iomanip> //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; }