#include #include #include #include #include #include #include #include #include #include #include #include #include #define p(s) cout<<(s)<=n;i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define F first #define S second typedef long long int ll; using namespace std; const int mod=1e9+7; int H, W, N; char c[1000010]; int n[1000010]; int main(){ cin>>H>>W>>N; int x=0,y=0; REP(i,0,N){ cin>>c[i]>>n[i]; } RREP(i,0,N){ if(c[i]=='R'&&n[i]==y){ x=(x-1+W)%W; }else if(c[i]=='C'&&n[i]==x){ y=(y-1+H)%H; } } if((x+y)%2) p("black"); else p("white"); return 0; }