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