#include using namespace std; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) char S[1111111]; int K[1111111]; int main(){ int H, W, N; cin >> H >> W >> N; string s; REP(i,N){ cin >> s >> K[N-i-1]; S[N-i-1] = s[0]; } int x = 0, y = 0; REP(i,N){ if(S[i] == 'R'){ if(y == K[i]) x = (x + W - 1) % W; } else { if(x == K[i]) y = (y + H - 1) % H; } } cout << ((x+y)%2 ? "black" : "white") << endl; }