#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdint.h>
using namespace std;

using uint = unsigned int;
using ll = long long;

#define CIN( LL , A ) LL A; cin >> A 

int main()
{

  CIN( ll , W );
  CIN( ll , H );
  CIN( string , C );
  const string color[2] = { "B" , "W" };
  ll start_num = C == color[0] ? 0 : 1;
  ll num;
  
  for( ll i = 0 ; i < H ; i++ ){

    num = start_num;
    
    for( ll j = 0 ; j < W ; j++ ){

      cout << color[ num % 2 ];
      num++;

    }

    cout << endl;
    start_num++;
    
  }
    
  return 0;

}