#include<bits/stdc++.h>
#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)
using namespace std;

int main() {
    int w, h; cin >> w >> h;
    char c; cin >> c;
    rep(i,0,h){
        rep(j,0,w){
            if ((i + j) % 2 ^ c == 'B') {
                cout << "B";
            } else {
                cout << "W";
            }
        }
        cout << endl;
    }
}