#include #define rep(i,a,b) for(int i=int(a);i> H >> W >> N; vector V(N); vector C(N); rep(i,0,N){ cin >> C[i] >> V[i]; } int y = 0,x = 0; for(int i = N-1;i >= 0;i--){ if(V[i] == x || V[i] == y){ if(C[i] == 'R')x = (x + W - 1) % W; else y = (y + H - 1) % H; } } //cout << x << " " << y << endl; if((x + y) & 1)cout << "black" << endl; else cout << "white" << endl; }