#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>

using namespace std;

#define pb push_back
typedef long long ll;
typedef complex<int> P;


int Check(vector<vector<vector<int> > > &cube, int n, int m){
	for(int k=0;k<n;k++){
		for(int j=0;j<n;j++){
		//1D_x
			{
				int p = 0; int cnt = 0;
				for(int a=0;a<n-m+1;a++){
					for(int i=0;i<m;i++){
						int q = cube[k][j][i+a];
						if(i == 0){
							if(q == 0) break;
							p = q;
							cnt = 0;
						}
						if(q == p) cnt++;
						else break;
					}
					if(cnt == m) return p;
				}
//				if(cnt == m) return p;
			}
		//1D_y
			{
				int p = 0; int cnt = 0;
				for(int a=0;a<n-m+1;a++){
					for(int i=0;i<m;i++){
						int q = cube[k][i+a][j];
						if(i == 0){
							if(q == 0) break;
							p = q;
							cnt = 0;
						}
						if(q == p) cnt++;
						else break;
					}
					if(cnt == m) return p;
				}
//				if(cnt == m) return p;
			}
		//1D_z
			{
				int p = 0; int cnt = 0;
				for(int a=0;a<n-m+1;a++){
					for(int i=0;i<m;i++){
						int q = cube[i+a][j][k];
						if(i == 0){
							if(q == 0) break;
							p = q;
							cnt = 0;
						}
						if(q == p) cnt++;
						else break;
					}
					if(cnt == m) return p;
				}
//				if(cnt == m) return p;
			}
		}
	}
	for(int k=0;k<n;k++){
		//2D_x1
		{
			int p = 0; int cnt = 0;
			for(int a=0;a<n-m+1;a++)
			for(int b=0;b<n-m+1;b++){
				for(int i=0;i<m;i++){
					int q = cube[i+a][i+b][k];
					if(i == 0){
						if(q == 0) break;
						p = q;
						cnt = 0;
					}
					if(q == p) cnt++;
					else break;
				}
				if(cnt == m) return p;
			}
//			if(cnt == m) return p;
		}
		//2D_x2
		{
			int p = 0; int cnt = 0;
			for(int a=0;a<n-m+1;a++)
			for(int b=0;b<n-m+1;b++){
				for(int i=0;i<m;i++){
					int q = cube[i+a][n-1-i-b][k];
					if(i == 0){
						if(q == 0) break;
						p = q;
						cnt = 0;
					}
					if(q == p) cnt++;
					else break;
				}
				if(cnt == m) return p;
			}
//			if(cnt == m) return p;
		}
		//2D_y1
		{
			int p = 0; int cnt = 0;
			for(int a=0;a<n-m+1;a++)
			for(int b=0;b<n-m+1;b++){
				for(int i=0;i<m;i++){
					int q = cube[i+a][k][i+b];
					if(i == 0){
						if(q == 0) break;
						p = q;
						cnt = 0;
					}
					if(q == p) cnt++;
					else break;
				}
				if(cnt == m) return p;
			}
//			if(cnt == m) return p;
		}
		//2D_y2
		{
			int p = 0; int cnt = 0;
			for(int a=0;a<n-m+1;a++)
			for(int b=0;b<n-m+1;b++){
				for(int i=0;i<m;i++){
					int q = cube[i+a][k][n-1-i-b];
					if(i == 0){
						if(q == 0) break;
						p = q;
						cnt = 0;
					}
					if(q == p) cnt++;
					else break;
				}
				if(cnt == m) return p;
			}
//			if(cnt == m) return p;
		}
		//2D_z1
		{
			int p = 0; int cnt = 0;
			for(int a=0;a<n-m+1;a++)
			for(int b=0;b<n-m+1;b++){
				for(int i=0;i<m;i++){
					int q = cube[k][i+a][i+b];
					if(i == 0){
						if(q == 0) break;
						p = q;
						cnt = 0;
					}
					if(q == p) cnt++;
					else break;
				}
				if(cnt == m) return p;
			}
//			if(cnt == m) return p;
		}
		//2D_z2
		{
			int p = 0; int cnt = 0;
			for(int a=0;a<n-m+1;a++)
			for(int b=0;b<n-m+1;b++){
				for(int i=0;i<m;i++){
					int q = cube[k][i+a][n-1-i-b];
					if(i == 0){
						if(q == 0) break;
						p = q;
						cnt = 0;
					}
					if(q == p) cnt++;
					else break;
				}
				if(cnt == m) return p;
			}
//			if(cnt == m) return p;
		}
	}
	//3D_1
	{
		int p = 0; int cnt = 0;
		for(int a=0;a<n-m+1;a++)
		for(int b=0;b<n-m+1;b++)
		for(int c=0;c<n-m+1;c++){
			for(int i=0;i<m;i++){
				int q = cube[i+a][i+b][i+c];
				if(i == 0){
					if(q == 0) break;
					p = q;
					cnt = 0;
				}
				if(q == p) cnt++;
				else break;
			}
			if(cnt == m) return p;
		}
//		if(cnt == m) return p;
	}
	//3D_2
	{
		int p = 0; int cnt = 0;
		for(int a=0;a<n-m+1;a++)
		for(int b=0;b<n-m+1;b++)
		for(int c=0;c<n-m+1;c++){
			for(int i=0;i<m;i++){
				int q = cube[n-1-i-a][i+b][i+c];
				if(i == 0){
					if(q == 0) break;
					p = q;
					cnt = 0;
				}
				if(q == p) cnt++;
				else break;
			}
			if(cnt == m) return p;
		}
//		if(cnt == m) return p;
	}
	//3D_3
	{
		int p = 0; int cnt = 0;
		for(int a=0;a<n-m+1;a++)
		for(int b=0;b<n-m+1;b++)
		for(int c=0;c<n-m+1;c++){
			for(int i=0;i<m;i++){
				int q = cube[i+a][i+b][n-1-i-c];
				if(i == 0){
					if(q == 0) break;
					p = q;
					cnt = 0;
				}
				if(q == p) cnt++;
				else break;
				if(cnt == m) return p;
			}
			if(cnt == m) return p;
		}
//		if(cnt == m) return p;
	}
	//3D_4
	{
		int p = 0; int cnt = 0;
		for(int a=0;a<n-m+1;a++)
		for(int b=0;b<n-m+1;b++)
		for(int c=0;c<n-m+1;c++){
			for(int i=0;i<m;i++){
				int q = cube[n-1-i-a][i+b][n-1-i-c];
				if(i == 0){
					if(q == 0) break;
					p = q;
					cnt = 0;
				}
				if(q == p) cnt++;
				else break;
				if(cnt == m) return p;
			}
			if(cnt == m) return p;
		}
//		if(cnt == m) return p;
	}
	
	return 0;
}



bool solve(){
	int n, m, p;
	cin>> n>> m>> p;
	if(n==0 && m==0 && p==0) return false;
//	cout<< endl; cout<< n<< " "<< m<< " "<< p<< endl;
	
	vector<vector<vector<int> > > cube(n, vector<vector<int> >(n, vector<int>(n, 0) ) );
	int turn = -1;
	int ans1 = 0, ans2 = -1;
	for(int i=0;i<p;i++){
		int x, y;
		cin>> x>> y;
		x = x-1; y = y-1;
		for(int j=0;j<n;j++){
			if(cube[j][y][x] == 0){
				cube[j][y][x] = turn;
				break;
			}
		}
		
		if(ans1 == 0){
			ans1 = Check(cube, n, m);
			if(ans1 != 0) ans2 = i+1;
		}
		turn *= -1;
	}
	
/*	for(int i=n-1;i>=0;i--){
		for(int j=0;j<n;j++){
			for(int k=0;k<n;k++){
				cout<< " "<< cube[i][j][k];
			}
			cout<< endl;
		}
		cout<< endl;
	}
*/	
	if(ans1){
		cout<< ((ans1 == 1) ? "White" : "Black")<< " "<< ans2<< endl;
	}else{
		cout<< "Draw"<< endl;
	}
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	
	while(solve());
	return 0;
}

 

Measured memory_bytes: 1220