H,W=gets.split.map(&:to_i) N = gets.to_i ops = [] BIG=100000 STDIN.read.split("\n").map{|line| s,k=line.split k = k.to_i if s=='R' ops << k else ops << k + BIG end # ops << [s, k] } # ops.reverse! x=0 y=0 count = 0 ops.reverse_each{|op| if op < BIG && op == y count +=1 x = (x+W-1)%W if x==W-1 && W%2==1 count +=1 end elsif op >= BIG && op - BIG == x count += 1 y = (y+H-1)%H if y==H-1 && H%2==1 count +=1 end end } if count%2==0 puts 'white' else puts 'black' end