#include #include #include using namespace std; int main() { int w,h; string c; cin >> w >> h >> c; //w,h vector生成 vector< vector > arr; arr.resize(h); for (int i = 0; i < h; i++) { arr[i].resize(w); } //arrにBW入力、出力 string s; if (c == "B") { s = "W" ;} if (c == "W") { s = "B" ;} for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if ((i + j) % 2 == 0) { arr[i][j] = c; }else { arr[i][j] = s; } if (j == w - 1) { cout << arr[i][j] << "\n"; }else{ cout << arr[i][j]; } } } return 0; }