H, W = map(int, input().split())
N = int(input())
op = [list(input().split()) for i in range(N)]
op = op[::-1]
r, c = 0, 0
for i in range(N):
    if op[i][0] == "R" and int(op[i][1]) == r:
        c = (c - 1) % W
    if op[i][0] == "C" and int(op[i][1]) == c:
        r = (r - 1) % H
if (r + c) % 2:
    print("black")
else:
    print("white")