#include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
#ifdef DEBUG
#define line() cerr << "[" << __LINE__ << "] ";
#define dump(i) cerr << #i ": " << i << " ";
#define dumpl(i) cerr << #i ": " << i << endl;
#else
#define line(i)
#define dump(i)
#define dumpl(i)
#endif
using namespace std;
int n, m, p;

typedef vector<vector<vector<int>>> Board;

bool ok(int x)
{
    return (0 <= x && x < n);
}

bool check(Board &b, int z, int y, int x, int dz, int dy, int dx, int turn)
{
    int c = 0;

    rep(i, n)
    {
        if (!(ok(z + dz * i) && ok(y + dy * i) && ok(x + dx * i)))
        {
            return false;
        }
        if (b[z + dz * i][y + dy * i][x + dx * i] == turn)
        {
            c++;
        }
        else
        {
            c = 0;
        }
        if (c == m)
            return true;
    }
    return false;
}

void put(Board &b, int y, int x, int turn)
{
    int z = n - 1;
    while (z != -1 && b[z][y][x] == 0)
    {
        z--;
    }
    z++;
    b[z][y][x] = turn;
}

bool isfinish(Board &b, int turn)
{
    rep(z, n) rep(y, n) rep(x, n)
    {
        bool f = false;
        f = f || check(b, z, y, x, 0, 0, 1, turn);
        f = f || check(b, z, y, x, 0, 1, 0, turn);
        f = f || check(b, z, y, x, 1, 0, 0, turn);

        f = f || check(b, z, y, x, 1, 1, 0, turn);
        f = f || check(b, z, y, x, 1, 0, 1, turn);
        f = f || check(b, z, y, x, 0, 1, 1, turn);

        f = f || check(b, z, y, x, 1, -1, 0, turn);
        f = f || check(b, z, y, x, 1, 0, -1, turn);
        f = f || check(b, z, y, x, 0, 1, -1, turn);

        f = f || check(b, z, y, x, 1, 1, 1, turn);
        f = f || check(b, z, y, x, -1, 1, 1, turn);
        f = f || check(b, z, y, x, 1, -1, 1, turn);
        f = f || check(b, z, y, x, 1, 1, -1, turn);
        if (f == true)
        {
            return true;
        }
    }
    return false;
}

int main(int argc, char const *argv[])
{

    while (true)
    {

        cin >> n >> m >> p;
        if (n == 0 && m == 0 && p == 0)
        {
            break;
        }
        vector<int> t(n, 0);
        vector<vector<int>> s(n, t);
        Board b(n, s);
        vector<int> x(p, 0), y(p, 0);
        rep(i, p)
        {
            cin >> x[i] >> y[i];
            x[i]--;
            y[i]--;
        }
        bool f = true;
        int turn;
        rep(i, p)
        {
            if (i % 2 == 0)
                turn = 1;
            else
                turn = 2;

            put(b, y[i], x[i], turn);
            if (isfinish(b, turn))
            {
                if (turn == 1)
                {
                    cout << "Black " << i + 1 << endl;
                    f = false;
                    break;
                }
                else
                {
                    cout << "White " << i + 1 << endl;
                    f = false;
                    break;
                }
            }
        }

        if (f == true)
        {
            cout << "Draw" << endl;
        }
    }
    return 0;
}


Measured memory_bytes: 3044