H, W = map(int, input().split()) N = int(input()) SK = [] for _ in range(N): s, k = input().split() k = int(k) SK.append((s, k)) x, y = 0, 0 for s, k in reversed(SK): if s == "R": if x == k: y -= 1 y %= W else: if y == k: x -= 1 x %= H if (x & 1) ^ (y & 1) == 0: print("white") else: print("black")