H, W = map(int, input().split()) N = int(input()) operations = [] for _ in range(N): S, K = input().split() operations.append((S, int(K))) i, j = 0, 0 for op in reversed(operations): S, K = op if S == 'R': if i == K: j = (j - 1) % W else: if j == K: i = (i - 1) % H if (i + j) % 2 == 0: print("white") else: print("black")