/*#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define pi 3.14159265359
#define shosu(X) fixed << setprecision(X)
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int dx[] = { 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1};
int dy[] = { 0, 1, 0, 1,-1, 0, 0, 1, 1, 1, 1,-1,-1};
int dz[] = { 0, 0, 1, 0, 0, 1,-1, 1,-1, 1,-1, 1,-1};
int n,m,p;
int data[8][8][8];
int high[8][8];
int bnum,wnum;
void bpush(int x,int y,int col){
	data[x-1][y-1][high[x-1][y-1]] = col;
	high[x-1][y-1]++;
}

bool inrange(int x,int y,int z){
	return (x>-1&&y>-1&&z>-1&&x<n&&y<n&&z<n);
}
bool subcheck(int x,int y,int z,int col,int num,int d){
	if(num==1) return true;
	else{
		int nx = x+dx[d]; int ny = y+dy[d]; int nz = z+dz[d];
		if(!inrange(nx,ny,nz)) return false;
		if(data[nx][ny][nz]==col) return subcheck(nx,ny,nz,col,num-1,d);
		else return false;
	}
	return true;//dummy
}
void dprint(){
	cout << "----------" << endl;
	REP(i,n){
		REP(j,n){
			REP(k,n){
				if(data[j][k][i]==2) cout << "B ";
				else if(data[j][k][i]==1) cout <<"W ";
				else if(data[j][k][i]==0) cout <<  "X ";
 			}
 			cout << endl;
		}
		cout << endl;
	}
}
void check(){
	REP(i,n){REP(j,n){REP(k,n){
		REP(l,13) if(data[i][j][k]==2) bnum+=subcheck(i,j,k,2,m,l);
	}}}
	REP(i,n){REP(j,n){REP(k,n){
		REP(l,13) if(data[i][j][k]==1) wnum+=subcheck(i,j,k,1,m,l);
	}}}
}
int main(){
	while(1){
		cin >> n >> m >> p;
		if(n==0&&m==0&&p==0) break;
		bnum = 0; wnum = 0;
		REP(i,8){
			REP(j,8){
				REP(k,8) data[i][j][k] = 0;
				high[i][j] = 0;
			}
		}
		bool endflg = false;
		REP(i,p){
			int x,y;
			cin >> x >> y;
			if(i%2==0) bpush(x,y,2);//black
			else bpush(x,y,1);//white

			check();
			dprint();
			if(!endflg){
				if(bnum!=wnum) endflg = true;
				if(bnum<wnum) cout << "White " << i+1 << endl;
				else if(bnum>wnum) cout << "Black " << i+1 << endl;
			}
		}
		//cout << bnum << " " << wnum << endl;
		if(!endflg) cout << "Draw" << endl;
 	}
 }

 */

 #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <iomanip>
   
using namespace std;
 
#define pi 3.141592653589793
 
bool isfinish(char p[8][8][8], int n, int m, int z[8][8], int x, int y)
{
    int dx[13] = {1, 0, 0, 1, 1, 0, 0, 1, -1, 1, 1, -1, 1};
    int dy[13] = {0, 1, 0, 1, -1, 1, 1, 0, 0, 1, 1, 1, -1};
    int dz[13] = {0, 0, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, 1};
    for(int i = 0; i < 13; i++){
        int ballnum = 1;
        int nx = x + dx[i], ny = y + dy[i], nz = z[x][y] - 1 + dz[i];
        char c = p[x][y][z[x][y] - 1];
        while(nx > 0 && ny > 0 && nz > 0 && nx <= n && ny <= n && nz <= z[nx][ny] - 1 && c == p[nx][ny][nz]){
            ballnum++;
            nx += dx[i];
            ny += dy[i];
            nz += dz[i];
        }
        nx = x - dx[i];
        ny = y - dy[i];
        nz = z[x][y] - 1 - dz[i];
        while(nx > 0 && ny > 0 && nz > 0 && nx <= n && ny <= n && nz <= z[nx][ny] - 1 && c == p[nx][ny][nz]){
            ballnum++;
            nx -= dx[i];
            ny -= dy[i];
            nz -= dz[i];
        }
        // cout << ballnum << endl;
        if(ballnum >= m) return true;
    }
    return false;
}
 
int main()
{
    int n, m, p;
    while(1){
        cin >> n >> m >> p;
        if(n == 0 && m == 0 && p == 0) break;
        char puzzle[8][8][8];
        int height[8][8];
        for(int i = 1; i < n + 1; i++){
            for(int j = 1; j < n + 1; j++){
                height[i][j] = 1;
                for(int k = 1; k < n + 1; k++){
                    puzzle[i][j][k] = 'n';
                }
            }
        }
        // height[i][j]: (x, y) = (i, j)????????¨?????????????¬????????????????????????????
        int x, y;
        int ans = -1;
        for(int i = 0; i < p; i++){
            cin >> x >> y;
            if(ans != -1) continue;
            if(i % 2 == 0) puzzle[x][y][height[x][y]] = 'b';
            else puzzle[x][y][height[x][y]] = 'w';
            height[x][y]++;
            if(p < 2 * (m - 1)) continue;
            if(isfinish(puzzle, n, m, height, x, y)) ans = i + 1;
        }
        if(ans == -1) cout << "Draw" << endl;
        else if(ans % 2 == 1) cout << "Black" << " " << ans << endl;
        else cout << "White" << " " << ans << endl;
    }
    return 0;
}

Measured memory_bytes: 1164