h,w = map(int, raw_input().split()) k = int(raw_input()) l = [raw_input().split() for _ in range(k)] l.reverse() x = 0 y = 0 for c,i in l: if c == 'R' and y == int(i): x = (x+w-1) % w elif c == 'C' and x == int(i): y = (y+h-1) % h if (x+y) % 2 == 0: print 'white' else: print 'black'