#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>
#include<set>
#include<bitset>
#include<math.h>
#include<map>
#include<queue>
#include<iomanip>
using namespace std;

int main(){
    int h, w;
    string s;
    cin >> w >> h >> s;
    for (int i = 0; i < h; i++){
        for (int j = 0; j < w; j++){
            if (s == "B" && !((i+j)%2)) cout << 'B';
            else if (s == "B" && (i+j)%2) cout << 'W';
            else if (s == "W" && !((i+j)%2)) cout << 'W';
            else cout << "B";
        }
        cout << endl;
    }
}