local ior = io.input() local h, w, n = ior:read("*n", "*n", "*n", "*l") local way, pos = {}, {} local str = "" for i = 1, n do str = ior:read() local a, b = str:match("(%w) (%d+)") way[i], pos[i] = a, tonumber(b) end local curcol, currow = 0, 0 for i = n, 1, -1 do if(way[i] == "C") then if(curcol == pos[i]) then currow = currow - 1 if(currow == -1) then currow = h - 1 end end else if(currow == pos[i]) then curcol = curcol - 1 if(curcol == -1) then curcol = w - 1 end end end end print((curcol + currow) % 2 == 1 and "black" or "white")