Black = 1
White = -1
Blank = 0

Next = [
  [1, 0, 0],
  [1, 1, 0],
  [0, 1, 0],
  [-1, 1, 0],
  [0, 0, 1],
  [1, 0, 1],
  [1, 1, 1],
  [0, 1, 1],
  [-1, 1, 1],
  [-1, 0, 1],
  [-1, -1, 1],
  [0, -1, 1],
  [1, -1, 1],
]

def move!(peg, x, y, color)
  n = peg.size - 2
  for z in 1..n do
    next if peg[x][y][z] != Blank
    peg[x][y][z] = color
    break
  end
end

def over?(peg, m)
  n = peg.size - 2
  for z in 1..n do
    for y in 1..n do
      for x in 1..n do
        next if peg[x][y][z] == Blank
        Next.each do |(dx, dy, dz)|
          color = peg[x][y][z]
          count = 1
          nx = x + dx
          ny = y + dy
          nz = z + dz
          while peg[nx][ny][nz] == color do
            count += 1
            nx += dx
            ny += dy
            nz += dz
          end
          return true if count >= m
        end
      end
    end
  end
  false
end

while true do
  n, m, p = gets.split.map(&:to_i)
  break if n | m | p == 0
  peg = Array.new(n + 2) {Array.new(n + 2) {Array.new(n + 2, Blank)}}

  player = Black
  win = Blank
  move = 0
  p.times do
    x, y = gets.split.map(&:to_i)
    next if win != Blank
    move += 1
    move!(peg, x, y, player)
    win = player if over?(peg, m)
    player *= -1
  end

  case win
    when Black
      printf "Black %d\n", move
    when White
      printf "White %d\n", move
    else
      puts "Draw"
  end
end