#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef vector VI; typedef vector VVI; typedef vector VS; typedef pair PII; typedef long long LL; typedef vector VLL; typedef unsigned long long ULL; typedef pair PIL; typedef vector VPIL; #define range(i,a,b) for(int i=(a); i < (b); i++) #define rep(i,n) range(i,0,n) int main(){ int H,W,N,k,hx=0,hy=0; string s; vector S; vector K; scanf("%d %d",&H,&W); scanf("%d",&N); rep(i,N){ cin >> s; S.push_back(s); cin >> k; K.push_back(k); } for(int i = N-1; i>=0; i--){ if (S[i] == "R"){ if (K[i] == hy) hx = (hx - 1 + W) % W; } else { if (K[i] == hx) hy = (hy - 1 + H) % H; } } if ((hx + hy) % 2 == 0){ printf("white\n"); }else{ printf("black\n"); } return 0; }