H,W = map(int,raw_input().split()) N = int(raw_input()) SK = [raw_input().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 if hx == -1: hx = W - 1 else: if k == hx: hy = hy - 1 if hy == -1: hy = H - 1 print "white" if (hx + hy) % 2 == 0 else "black"