#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <complex>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <iterator>

using namespace std;

#define dump(n) cout<<"# "<<#n<<'='<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define iter(c) __typeof__((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();++i)
#define all(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;
typedef pair<int,int> pii;

const int INFTY=1<<29;
const double EPS=1e-9;

template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p){
	return os<<'('<<p.first<<','<<p.second<<')';
}
template<typename T>
ostream& operator<<(ostream& os,const vector<T>& a){
	os<<'[';
	rep(i,a.size()) os<<(i?" ":"")<<a[i];
	return os<<']';
}

bool finish(int n,int m,vvvi board)
{
	int dx[]={1,0,0, 1,0,1,-1,0,1, 1,-1,1,-1},
		dy[]={0,1,0, 1,1,0,1,-1,0, 1,1,-1,-1},
		dz[]={0,0,1, 0,1,1,0,1,-1, 1,1,1,1};
	rep(i,n) rep(j,n) rep(k,n) rep(l,13){
		bool flg=true;
		int x=i,y=j,z=k;
		rep(p,m){
			if(x<0 || n<=x || y<0 || n<=y || z<0 || n<=z
			|| z>=board[x][y].size() || board[x][y][z]!=board[i][j][k]){
				flg=false;
				break;
			}
			x+=dx[l],y+=dy[l],z+=dz[l];
		}
		if(flg) return true;
	}
	return false;
}

string solve(int n,int m,int p,vi rs,vi cs)
{
	vvvi board(n,vvi(n));
	rep(i,p){
		int color=i&1; // 0:black,1:white
		int r=rs[i],c=cs[i];
		board[r][c].push_back(color);
		if(finish(n,m,board))
			return string(color?"White":"Black")+" "+to_string(i+1);
	}
	return "Draw";
}

int main()
{
	for(int n,m,p;cin>>n>>m>>p && n|m|p;){
		vi rs(p),cs(p);
		rep(i,p){
			cin>>rs[i]>>cs[i];
			rs[i]--,cs[i]--;
		}
		cout<<solve(n,m,p,rs,cs)<<endl;
	}
	
	return 0;
}