h,w=map(int,input().split()) n=int(input()) sk=[input().split() for _ in range(n)] i=j=0 for s,k in sk[::-1]: k=int(k) if s=="R" and i==k:j=(j-1)%w if s=="C" and j==k:i=(i-1)%w if (i+j)&1:print("black") else:print("white")