from sys import stdin def solve(): H,W = map(int,stdin.readline().split()) N = int(raw_input()) SK = [stdin.readline().split() for i in xrange(N)] hx = hy = 0 for i in xrange(N-1,-1,-1): s,k = SK[i] k = int(k) if s == "R": if k == hy: hx = (hx - 1) % W else: if k == hx: hy = (hy - 1) % H print "white" if (hx + hy) % 2 == 0 else "black" solve()