import sys input=lambda: sys.stdin.readline().rstrip() h,w=map(int,input().split()) n=int(input()) S=[tuple(input().split()) for _ in range(n)] x,y=0,0 for s,k in S[::-1]: if s=="R" and x==int(k): y-=1 if y<0: y+=w if s=="C" and y==int(k): x-=1 if x<0: x+=h if (x+y)%2==0: print("white") else: print("black")