### constant

BLACK = 0
WHITE = 1

DXYZS = [
  ## 1D
  [1, 0, 0], [0, 1, 0], [0, 0, 1],
  ## 2D
  [1, 1, 0], [-1, 1, 0], [0, 1, 1], [0, -1, 1], [1, 0, 1], [1, 0, -1],
  ## 3D
  [1, 1, 1], [-1, 1, 1], [1, -1, 1], [-1, -1, 1],
]

### subroutines

def check(n, m, flds, turn)
  for x0 in (0...n)
    for y0 in (0...n)
      for z0 in (0...n)
        next if flds[x0][y0][z0] != turn
        DXYZS.each do |dx, dy, dz|
          seq = 1
          x = x0 + dx
          y = y0 + dy
          z = z0 + dz
          while x >= 0 && x < n && y >= 0 && y < n && z >= 0 && z < n &&
              flds[x][y][z] == turn
            seq += 1
            x += dx
            y += dy
            z += dz
            return true if seq >= m
          end
        end
      end
    end
  end

  false
end

### main

loop do
  n, m, pn = gets.split.map(&:to_i)
  break if (n | m | pn) == 0

  mvs = pn.times.map{gets.split.map{|d| d.to_i - 1}}
  #p mvs

  flds = n.times.map{n.times.map{n.times.map{nil}}}
  zs = n.times.map{n.times.map{0}}

  turn = BLACK
  nmv = 0
  winner = nil

  mvs.each do |x, y|
    nmv += 1
    flds[x][y][zs[x][y]] = turn
    zs[x][y] += 1

    if check(n, m, flds, turn)
      winner = turn
      break
    end

    turn = (turn == BLACK) ? WHITE : BLACK
  end

  if winner.nil?
    puts 'Draw'
  else
    puts [winner == BLACK ? 'Black' : 'White', nmv].join(' ')
  end
end