@dir = [[[0, 0, 0], [0, 0, 1], [0, 0, 2]],
  [[0, 0, 0], [0, 1, 0], [0, 2, 0]],
  [[0, 0, 0], [1, 0, 0], [2, 0, 0]],
  [[0, 0, 0], [0, 1, 1], [0, 2, 2]], 
  [[0, 0, 0], [0, 1, -1], [0, 2, -2]], 
  [[0, 0, 0], [1, 0, 1], [2, 0, 2]], 
  [[0, 0, 0], [1, 0, -1], [2, 0, -2]],
  [[0, 0, 0], [1, 1, 0], [2, 2, 0]],
  [[0, 0, 0], [1, -1, 0], [2, -2, 0]],
  [[0, 0, 0], [1, 1, 1], [2, 2, 2]], 
  [[0, 0, 0], [1, 1, -1], [2, 2, -2]], 
  [[0, 0, 0], [1, -1, -1], [2, -2, -2]], 
  [[0, 0, 0], [1, -1, 1], [2, -2, 2]]]

def check(balls, direction)
  balls.combination(3) do |ball|
    direction.each do |dir|
      return true if ball.zip(dir).map{ |b, d| b.zip(d).map{ |a, b| a - b } }.all?{ |p| p == ball[0] }
    end
  end
  false
end

loop do
  n, m, p = gets.split.map(&:to_i)
  break if n == 0
  balls = 2.times.map{ [] }
  board = n.times.map{ [0] * n }
  ok = false
  p.times do |i|
    x, y = gets.split.map(&:to_i)
    z = (board[y - 1][x - 1] += 1)
    pos = [x, y, z]
    balls[i % 2] << pos
    balls[i % 2].sort!
    next if ok
    if check(balls[i % 2], @dir)
      printf "%s %d\n" % [['Black', 'White'][i % 2], i + 1]
      ok = true
    end
  end
  puts 'Draw' unless ok
end