#include #include #include #include #define READ_BUFSIZE ( 1024 ) #define READ_DELIMITER ( " " ) #define ICHI ("BWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWB") int main(int argc, char *argv[]) { int W = 0; scanf("%d", &W); int H = 0; scanf("%d", &H); char C[2] = ""; scanf("%s", C); char* p1 = 0; char* p2 = 0; if( C[0] == 'B') { p1 = ICHI; p2 = p1 + 1; } else { p2 = ICHI; p1 = p2 + 1; } for (int i = 0; i < H; i++) { if( i == 0 || i % 2 == 0 ) printf("%.*s\n", W, p1 ); else printf("%.*s\n", W, p2); } return 0; }