def solve(): H, W = map(int, input().split()) N = int(input()) A = [None] * N for i in range(N): A[i] = input().split() x = y = 0 for i in range(N - 1, -1, -1): s, k = A[i] if s == 'R': if int(k) == y: x = x - 1 if x else W - 1 else: if int(k) == x: y = y - 1 if y else H - 1 print('black' if ((x + y) % 2) else 'white') if __name__ == '__main__': solve()