#include <cstdio>
#include <cstring>
using namespace std;
char res[51][51];
int main()
{
    int w, h;
    char c;
    while (~scanf("%d%d %c", &w, &h, &c)) {
        for(int i=0;i<h;++i) {
            for(int j=0;j<w;++j) res[i][j]=c;
            for(int j=1-i%2;j<w;j+=2) res[i][j]=c=='B'?'W':'B';
            res[i][w]=0;
            puts(res[i]);
        }
    }
}