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