#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#include <cstring>
#include <cstdio>
#include <stack>
#define INF 1000000000
#define rep(i,n) for(int i =0;i<n;i++)
using namespace std;
typedef long long int ll;
typedef pair<int, int> i_i;

int n,m,p;
int g[8][8][8];
int used[8][8][8];
bool ch=false;

void dfs(pair<int, i_i> a,pair<int, i_i> b, int len){
    int x = a.first, y = a.second.first, z = a.second.second;
    int xx = b.first, yy = b.second.first, zz = b.second.second;
    if (x<0 or y<0 or z<0 or x>=n or y >=n or z >=n or ch) return;
    if(len>=m){
        ch = true;
        return;
    }
    if (b.first == 0 and b.second.first==0 and b.second.second == 0) {
        for (int i=-1; i<=1; i++) {
            for (int j=-1; j<=1; j++) {
                for (int k=-1; k<=1; k++) {
                    if (i==0 and j==0 and k==0)continue;
                    if (g[x+i][y+j][z+k]==g[x][y][z] and used[x+i][y+j][z+k]==0) {
                        used[x+i][y+j][z+k] = 1;
                        dfs({i+x,{j+y,k+z}}, {i,{j,k}}, len+1);
                        used[x+i][y+j][z+k]=0;
                    }
                }
            }
        }
    }else{
        for (int i=-1; i<=1; i++) {
            for (int j=-1; j<=1; j++) {
                for (int k=-1; k<=1; k++) {
                    if (!i and !j and !k)continue;
                    if (g[x+i][y+j][z+k]==g[x][y][z] and used[x+i][y+j][z+k]==0 and i==xx and j == yy and k == zz) {
                        used[x+i][y+j][z+k] = 1;
                        dfs({i+x,{j+y,k+z}}, {i,{j,k}}, len+1);
                        used[x+i][y+j][z+k]=0;
                    }
                }
            }
        }
    }
}

int  main(){
    for(;;){
        cin >> n >> m >> p;
        if(!n) break;
        rep(i,n)rep(j, n)rep(k, n) {
            g[i][j][k]=0;
            used[i][j][k]=0;
        }
        vector<pair<int, i_i> > black,white;
        pair<string, int> ans={"",0};
        ch = false;
        for (int i=0; i<p; i++) {
            int color = i%2+1;
            int x,y;
            cin >> x >> y;
            x--;
            y--;
            if(ch) continue;
            int p=0;
            while (g[x][y][p]!=0 and p<=n-1) {
                p++;
            }
            if (p==n) {
                break;
            }
            g[x][y][p]=color;
            if(color==1){
                black.push_back({x,{y,p}});
                for (int j=0; j<black.size(); j++) {
                    used[black[j].first][black[j].second.first][black[j].second.second]=1;
                    dfs(black[j], {0,{0,0}}, 1);
                    used[black[j].first][black[j].second.first][black[j].second.second]=0;
                }
                if (ch) {
                    ans = {"Black",i};
                }
            }
            if(color==2){
                white.push_back({x,{y,p}});
                for (int j=0; j<white.size(); j++) {
                    used[white[j].first][white[j].second.first][white[j].second.second]=1;
                    dfs(white[j], {0,{0,0}}, 1);
                    used[white[j].first][white[j].second.first][white[j].second.second]=0;
                }
                if (ch) {
                    ans = {"White",i};
                }
            }
            
        }
        if (ch) {
            cout << ans.first <<" "<<ans.second+1<<endl;
        }else{
            cout << "Draw"<<endl;
        }
    }
}

Measured memory_bytes: 1224