import std.stdio;
void main() {
int w,h;
char c;
readf("%d %d %c\n", &w, &h, &c);
for(int y=0; y<h; y++) {
for(int x=0; x<w;x++) {
write(c);
c = (c=='B'?'W':'B');
}
writeln();
if(w%2==0)
c = (c=='B'?'W':'B');
}
}