proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} 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: array[1000010,int16] for i in 0.. 0 if isC: op -= 1 if x != op: continue if y == 0: y = h - 1 else: y -= 1 else: op = -op - 1 if y != op: continue if x == 0: x = w - 1 else: x -= 1 if (x mod 2) == (y mod 2) : echo "white" else:echo "black"