import sys
input = sys.stdin.readline


h, w = [ int(v) for v in input().split() ]
n = int(input())
rotate_list = [ "" for i in range(n) ]

for i in range(n):
	rotate_list[i] = input()

y, x = 0, 0


for i in range(n):
	s = rotate_list[n-1-i]
	
	ope, target = s.split(" ")
	if int(target) == y:
		if ope == "R":
			x = (x-1) % w
	if int(target) == x:
		if ope == "C":
			y = (y-1) % h


if (x + y) % 2 == 0:
	print("white")
else:
	print("black")