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,int32] for i in 0.. 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"