h,w=map(int,raw_input().split()) n=input() x=0 y=0 for sk in[raw_input().split()for i in xrange(n)][::-1]: #print sk,x,y k=int(sk[1]) if ord(sk[0])==82: if y==k: x=(x-1+w)%w elif x==k: y=(y-1+h)%h print["white","black"][x&1^y&1]