@dir = [[0, 0, 1], [0, 1, 0], [1, 0, 0],
  [0, 1, 1], [0, 1, -1], [1, 0, 1], [1, 0, -1], [1, 1, 0], [1, -1, 0],
  [1, 1, 1], [1, 1, -1], [1, -1, -1], [1, -1, 1]]
def in_check(dir, x, y, z, n)
  dir[-1].zip([x, y, z]).all?{ |a, b| 0 <= a + b && a + b < n }
end

def check(balls, direction, n)
  n.times do |x|
    n.times do |y|
      n.times do |z|
        direction.each do |dir|
          next unless in_check(dir, x, y, z, n)
          return true if dir.map{ |dx, dy, dz| balls[x + dx][y + dy][z + dz] }.all?
        end
      end
    end
  end
  false
end

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