package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func main() { sc.Split(bufio.ScanWords) h, w, n := nextInt(), nextInt(), nextInt() ns := make([][]int, n) for i := range ns { ns[i] = []int{int(nextLine()[0]), nextInt()} } x, y := 0, 0 for i := n - 1; i >= 0; i-- { if ns[i][0] == 'R' { if y != ns[i][1] { continue } x-- if x < 0 { x = w - 1 } continue } if x != ns[i][1] { continue } y-- if y < 0 { y = h - 1 } } s := true if y&1 == 0 { s = false } if x&1 == 0 { s = !s } if s == true { fmt.Println("white") return } fmt.Println("black") } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i }