import sys
lines = sys.stdin.readlines()
H, W = map(int,lines[0].strip().split())
r = 0
c = 0
N = len(lines) - 2
for i in range(N):
	a,b = lines[N+1-i].strip().split()
	if a == "R" and int(b) == c:
		r = (r+W-1) % W
	elif a == "C" and int(b) == r:
		c = (c+H-1) % H

color = ["white","black"]
print color[(r+c)%2]