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