#include #include using namespace std; int main(){ int H, W, n, k; vector order; string sandk; scanf("%d %d", &H, &W); scanf("%d\n", &n); for(int i = 0; i < n; i++){ getline(cin, sandk); order.push_back(sandk); } int h = 0, w = 0; for(vector::reverse_iterator it = order.rbegin(); it != order.rend(); it++){ string now = *it; if(now[0] == 'R' && h == now[2]-'0'){ w--; if(w < 0) w += W; }else if(now[0] == 'C' && w == now[2]-'0'){ h--; if(h < 0) h += H; } } if((h+w)%2 == 0) cout << "white" << endl; else cout << "black" << endl; return 0; }