/* No.82 市松模様 https://yukicoder.me/problems/no/82 */ #include using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int w, h; char c; cin >> w >> h >> c; string mark; if (c == 'W') mark = "WB"; else mark = "BW"; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { cout << mark[(i + j) % 2]; } cout << endl; } }