H,W=map(int,input().split()) N=int(input()) A=[] B=[] for i in range(N): x,y=input().split() A.append(x) B.append(int(y)) list.reverse(A) list.reverse(B) x=0 y=0 for i in range(N): if A[i]=='R': if B[i]==x: y=(y-1+W)%W else: if B[i]==y: x=(x-1+H)%H if (x+y)%2: print('black') else : print('white')