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=(y-1)%w if s=="C" and y==int(k): x=(x-1)%h if (x+y)%2==0: print("white") else: print("black")