#include <iostream>
#include <algorithm>
using namespace std;

int main() {
  int w, h;
  cin >> w >> h;
  char color[2];
  cin >> color[0];
  color[1] = color[0] == 'B' ? 'W' : 'B';  
  for (int i = 0; i < h; ++i) { 
    for (int j = 0; j < w; ++j) {
      cout << color[j % 2];
    }
    swap(color[0], color[1]);
    cout << endl;
  }
  return 0;
}