#include using namespace std; const long long INF = 1LL << 60; #define MOD 1000000007; typedef long long ll; #define writeln(n) cout< P; typedef pair Psi; int main() { int h, w; char c; cin >> w >> h >> c; char cc; if (c == 'B') { cc = 'W'; } else { cc = 'B'; } string s, ss; for (int i = 0; i < w; i++) { if (i % 2 == 0) { s += c; ss += cc; } else { if (c == 'B') { s += "W"; } else { s += "B"; } if (cc == 'B') { ss += "W"; } else { ss += "B"; } } } for (int i = 0; i < h; i++) { if(i %2==0){ writeln(s); }else { writeln(ss); } } }