#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int w, h;
    char c;
    cin >> w >> h >> c;

    char a, b;
    if (c == 'B') {
        a = 'B', b = 'W';
    } else if (c == 'W') {
        a = 'W', b = 'B';
    }
    REP(i, h) {
        REP(j, w) {
            cout << (((i + j) % 2 == 0) ? a : b);
        }
        cout << endl;
    }
    return 0;
}