#include using namespace std; int main(void){ // Here your code ! int h, w; cin >> h >> w; bool isWhite[h][w]; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { isWhite[i][j] = ((i+j)&1) == 0; } } int n; cin >> n; cin.ignore(); bool tempC[h], tempR[w]; for (int i = 0; i < n; i++) { char ch; int line; cin >> ch >> line; cin.ignore(); if (ch == 'C') { for (int j = 0; j < h; j++) { tempC[j] = isWhite[j][line]; } for (int j = 0; j < h; j++) { isWhite[(j+1)%h][line] = tempC[j]; } } else { for (int j = 0; j < w; j++) { tempR[j] = isWhite[line][j]; } for (int j = 0; j < w; j++) { isWhite[line][(j+1)%w] = tempR[j]; } } } cout << (isWhite[0][0] ? "white" : "black") << endl; return 0; }