@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]]
@dir_rev = @dir.map{ |dx, dy, dz| [-dx, -dy, -dz] }

def out(dir, x, y, z, n, i)
  dir.zip([x, y, z]).any?{ |a, b| n <= a * i + b || a * i + b < 0 }
end

def turn_false(ok, dn, x, y, z, seq, n)
  seq.times do |i|
    break if out(@dir[dn], x, y, z, n, i)
    ok[x + @dir[dn][0] * i][y + @dir[dn][1] * i][z + @dir[dn][2] * i][dn] = false
  end
  seq.times do |i|
    break if out(@dir_rev[dn], x, y, z, n, i)
    ok[x + @dir_rev[dn][0] * i][y + @dir_rev[dn][1] * i][z + @dir_rev[dn][2] * i][dn] = false
  end
end


def check(turn, balls, ok, n, seq)
  n.times do |x|
    n.times do |y|
      n.times do |z|
        if balls[x][y][z] == turn
          13.times do |dn|
            if ok[x][y][z][dn]
              is_ok = true
              seq.times do |i|
                if out(@dir[dn], x, y, z, n, i)
                  is_ok = false
                  break
                else
                  if !ok[x + @dir[dn][0] * i][y + @dir[dn][1] * i][z + @dir[dn][2] * i][dn] ||
                    !balls[x + @dir[dn][0] * i][y + @dir[dn][1] * i][z + @dir[dn][2] * i]
                    is_ok = false
                    break
                  end
                end
              end
              return true if is_ok
            end
          end
        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 }
  fin = false
  balls = n.times.map{ n.times.map{ [false] * n } }
  ok = 2.times.map{ n.times.map{ n.times.map{ n.times.map { [true] * 13 } } } }
  p.times do |i|
    x, y = gets.split.map(&:to_i)
    next if fin
    z = (z_plane[y - 1][x - 1] += 1)
    balls[x - 1][y - 1][z - 1] = i % 2
    13.times{ |j| turn_false(ok[1 - i % 2], j, x - 1, y - 1, z - 1, m, n) }
    if check(i % 2, balls, ok[i % 2], n, m)
      printf "%s %d\n" % [['Black', 'White'][i % 2], i + 1]
      fin = true
    end
  end
  puts 'Draw' unless fin
end