import sys input = sys.stdin.readline H,W=map(int,input().split()) N=int(input()) Q=[input().split() for i in range(N)] x=0 y=0 for c,ind in Q[::-1]: if c=="R": if int(ind)==x: y=(y-1)%W if c=="C": if int(ind)==y: x=(x-1)%H if (x+y)%2==1: print("black") else: print("white")