#include <iostream>
#include <cstdio>
#include <numeric>
#include <algorithm>
#include <string>
#include <vector>
#include <functional>
#include <cmath>
#include <queue>

#define rep(i, a) FOR(i, 0, a)
#define FOR(i, a, b) for(int i = a; i < b; ++i)

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int, int> P;
struct edge{ int to, time, cost; };

int main(){
	int w, h;
	char a;
	std::cin >> w >> h >> a;
	rep(i, h){
		rep(j, w){
			std::cout << a;
			a = (a == 'W' ? 'B' : 'W');
		}
		if (w % 2 == 0)a = (a == 'W' ? 'B' : 'W');
		std::cout << std::endl;
	}
	return 0;
}