#include using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } inline void print(int x){ static int s[20],t=0; do s[++t]=x%10,x/=10;while(x); while(t) putchar(s[t--] + '0'); } struct node{ string s; int k; }; signed main(){ // int T; // freopen("puzzle.in","r",stdin); // freopen("puzzle.out","w",stdout); // T=read(); // whike(T--){ int h,w,n; pair nw={0,0}; cin>>h>>w>>n; vector Q(n); for(int i=0;i>Q[i].s>>Q[i].k; } for(int i=n-1;i>=0;i--){ if(Q[i].s=="R"){ if(nw.second==Q[i].k){ nw.first=(nw.first-1+w)%w; } }else{ if(nw.first==Q[i].k){ nw.second=(nw.second-1+h)%h; } } } cout<<((nw.first+nw.second)%2?"black\n":"white\n"); // } return 0; } // ????????????????????????? // ?????????????????? // ???????????????????????????????????? // ??????????????????????????????? // ???????????? // ???????????? // ???????????? // ???????????????????? // ???????????????????? // ???????????????????????????????? // ??????????????????????? // ??????????? // ?????????????