//Normal

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

void print(auto a){
  cout << a;
}

void prints(auto a){
  cout << a << " ";
}

void prints(){
  cout << " ";
}

void printl(auto a){
  cout << a << endl;
}

void printl(){
  cout << endl;
}

void fix(int n){
  cout << fixed << setprecision(n);
}

int main(){
  int W, H;
  char C;
  cin >> W >> H >> C;
  
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(i%2 == j%2){
        C == 'B' ? print("B") : print("W");
      }else{
        C == 'W' ? print("B") : print("W");
      }
      
      if(j+1 == W) printl();
    }
  }
  
  return 0;
}