#include using namespace std; signed main(){ int W, H; cin >> W >> H; string col; cin >> col; for( int i = 0; i < H; ++i, cout << endl ){ int p = i & 1; for( int j = 0; j < W; ++j, ++p ) cout << ( p & 1 ? ( col == "W" ? "B" : "W" ) : col ); } return 0; }