#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #define INF 1050000000 #define SIZE 100001 #define MOD 1000000007 using namespace std; int main(void) { int w, h; string c; cin >> w >> h >> c; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { cout << c; if (c == "W") c = "B"; else if (c == "B") c = "W"; } cout << endl; if (w % 2 == 0) { if (c == "W") c = "B"; else if (c == "B") c = "W"; } } return (0); } /*for (int i = 0; i < n; i++) { }*/