#include #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int w, h; string c; cin >> w >> h >> c; REP( i, h ){ REP( j, w ){ if( c == "B" ){ if( i%2 == 0 ){ cout << ( j%2 == 0 ? "B" : "W" ); }else{ cout << ( j%2 != 0 ? "B" : "W" ); } }else{ if( i%2 != 0 ){ cout << ( j%2 == 0 ? "B" : "W" ); }else{ cout << ( j%2 != 0 ? "B" : "W" ); } } } cout << endl; } return 0; }