#include #define REP(i,n,N) for(int i=(n);i<(int)N;i++) #define p(s) cout<<(s)<>H>>W>>N; char S[1000010]; int K[1000010]; REP(i,0,N) cin>>S[i]>>K[i]; int x,y; for(int i=N-1;i>=0; i--){ if(S[i]=='R'&&y==K[i]) x=(x+W-1)%W; if(S[i]=='C'&&x==K[i]) y=(y+H-1)%H; } p((x+y)%2?"black":"white"); return 0; }