#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int main(){
  int w,h;
  char c1;
  cin >> w >> h >> c1;
  char c2 = c1 == 'B' ? 'W' : 'B';
  FOR(i,1,h+1){
    string s = "";
    FOR(j,1,w+1){
      if(i%2==0){
        s += j % 2 == 1 ? c2 : c1;
      } else {
        s += j % 2 == 1 ? c1 : c2;
      }
    }
    cout << s << endl;
  }
  return 0;
}