proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}
proc scan(): int32 =
  while true:
    var k = getchar_unlocked()
    if k < '0': break
    result = 10 * result + k.ord.int32 - '0'.ord.int32
let h = scan()
let w = scan()
let n = scan()
var ops = newSeq[int32](n)
for i in 0..<n:
  let isC = getchar_unlocked() == 'C'
  discard getchar_unlocked()
  let k = scan()
  if isC : ops[i] = k+1
  else: ops[i] = -k-1
var x = 0
var y = 0
for i in (n-1).countdown(0):
  var op = ops[i]
  let isC = op > 0
  op = op.abs - 1
  if isC:
    if x != op: continue
    y = (y - 1 + h) mod h
  else:
    if y != op: continue
    x = (x - 1 + w) mod w

if (x mod 2) == (y mod 2) : echo "white"
else:echo "black"