#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <numeric>
#include <functional>
#include <set>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <climits>

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define FOE(i,a) for(auto i : a)
#define ALL(c) (c).begin(), (c).end()
#define EXIST(v, n) (std::find(v.begin(), v.end(), 1) != v.end())

using namespace std;

int main(int argc, char *argv[]) {
	int W, H;
	string C1, C2;
	cin >> W >> H;
	cin >> C1;
	C2 = C1 == "B" ? "W" : "B";
	REP(i, H) {
		REP(j, W) {
			cout << (i % 2 == j % 2 ? C1 : C2);
		}
		cout << endl;
	}
}