#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

int main() {
	int w, h;
	string c;

	cin >> w >> h >> c;

	if (w % 2 == 0) {
		//Wが偶数
		for (int i = 0; i < h; i++) {
			for (int j = 0; j < w; j++) {
				cout << c;
				if (c == "W") c = "B";
				else c = "W";
			}
			if (c == "W") c = "B";
			else c = "W";
			cout << endl;
		}
	} else {
		//Wが奇数
		for (int i = 0; i < h; i++) {
			for (int j = 0; j < w; j++) {
				cout << c;
				if (c == "W") c = "B";
				else c = "W";
			}
			cout << endl;
		}
	}
	return 0;
}