#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int W, H; cin >> W >> H; char C; cin >> C; int p = 0; if (C == 'B') p = 1; vector S = {'W', 'B'}; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cout << S[p]; p = 1 - p; } if (W % 2 == 0) p = 1 - p; cout << '\n'; } return 0; }