#include using namespace std; int main() { int h, w; char c; cin >> w >> h >> c; char d = (c == 'W' ? 'B' : 'W'); vector> ans(h, vector(w)); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if ((i + j) & 1) ans[i][j] = d; else ans[i][j] = c; } } for (const auto &v : ans) { for (const auto &e : v) cout << e; cout << '\n'; } return 0; }