#include <iostream>
#include <math.h>
#include <algorithm>
#include <map>
#include <vector>
#include <numeric>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, d, n) for (int i = d; i < (int)(n); i++)
#define rRep(i,n) for(int i = n; i >= 0; i--)
#define rRep2(i,d,n) for(int i = n; i >= d; i--)
#define forEach(arr) for (auto& it:arr)


int main(void){
    
    int w,h;
    char c;
    cin >> w >> h >> c;
    string s ="",t ="";
    
    rep(i,w) {
        s = s + c;
        c = c == 'B' ? 'W':'B';
        t = t + c;
    }
    
    rep(i,h) {
        if(i % 2 == 0) cout << s << endl;
        else cout << t << endl;
    }
    
}