#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>

#define INF (int)1e09

using std::cin;
using std::cout;
using std::endl;
using std::setprecision;
using std::fixed;
using std::pair;
using std::make_pair;
using std::min;
using std::max;
using std::string;
using std::vector;
using std::list;
using std::map;
using std::set; // insert erase find count
using std::queue;
using std::priority_queue;
using std::stack;

template <typename T> using Vec = vector<T>; // c++11
typedef pair<int, int> PII;
typedef pair<int, pair<int, int> > PIII;

/*
void print(Vec<Vec<Vec<int> > > &board) {
    for (int i = 0; i < n; i++) {
        cout << "I = " << i << endl;
        for (int j = 0; j < n; j++) {
            for (int k = 0; k < n; k++) {
                cout << board[i][j][k] << " ";
            }
            cout << endl;
        }
        cout << endl;
    }
    return;
}
*/

bool check(Vec<Vec<Vec<int> > > &board, int n, int m, int color, int y, int x, int z) {
    Vec<int> count(13, 0);
    Vec<int> max_count(13, 0);

    int dy[13] = {0,1,1,1,0,1,1,1,0,1,1,1,0};
    int dx[13] = {1,0,1,-1,1,0,1,-1,1,0,1,-1,0};
    int dz[13] = {0,0,0,0,-1,-1,-1,-1,1,1,1,1,1};

    for (int i = 0; i < 13; i++) {
        int ty = y; // temp_y
        int tx = x; // temp_x
        int tz = z; // temp_height

        //cout << "COORD_START = (" << ty << ", " << tx << ", " << tz << ")" << endl;
        while (1) {
            ty -= dy[i];
            tx -= dx[i];
            tz -= dz[i];
            if ((ty < 0 || ty >= n) || (tx < 0 || tx >= n) || (tz < 0 || tz >= n)) {
                ty += dy[i];
                tx += dx[i];
                tz += dz[i];
                break;
            }
        }
        //cout << "COORD_END = (" << ty << ", " << tx << ", " << tz << ")" << endl;
        //cout << "COORD_START = (" << ty << ", " << tx << ", " << tz << ")" << endl;
        while (1) {
            if ((ty < 0 || ty >= n) || (tx < 0 || tx >= n) || (tz < 0 || tz >= n)) {
                break;
            }
            if (board[ty][tx][tz] == color) {
                count[i]++;
                max_count[i] = max(max_count[i], count[i]);
            } else {
                count[i] = 0;
            }
            ty += dy[i];
            tx += dx[i];
            tz += dz[i];
        }
        //cout << "ANS = " << max_count[i] << endl;
    }

    for (int i = 0; i < 13; i++) {
        //cout << max_count[i] << " ";
        if (max_count[i] >= m) {
            return true;
        }
    }
    //cout << endl;
    return false;
}

int main(void) {
    while (1) {
        int n;
        int m;
        int p;
        cin >> n >> m >> p;
        if (n == 0 && m == 0 && p == 0) {
            break;
        }
        Vec<Vec<Vec<int> > > board(n, Vec<Vec<int> >(n, Vec<int>(n, -1)));

        bool winner_exist = false;
        for (int i = 0; i < p; i++) {
            //cout << "P = " << i << endl;
            int color = i % 2;
            int y;
            int x;
            cin >> y >> x;
            y--; x--;
            //cout << "(x, y)  = (" << x << ", " << y << ")" << endl;

            int j = 0;
            while (1) {
                if (board[y][x][j] == -1) {
                    board[y][x][j] = color;
                    break;
                } else {
                    j++;
                }
            }

            if (check(board, n, m, color, y, x, j) == true) {
                winner_exist = true;
                if (color == 0) {
                    cout << "Black ";
                } else {
                    cout << "White ";
                }
                cout << i + 1 << endl;
                // ????????????cin??????
                for (int loop = i + 1; loop < p; loop++) {
                    cin >> y >> x;
                }
                break;
            }
        }
        if (winner_exist == false) {
            cout << "Draw" << endl;
        }
    }
    return 0;
}

Measured memory_bytes: 3024