#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

int n, m, p, a[7][7][7], h[7][7];
int dx[]{ 1,1,-1,0,0,0,0,1,1,1,1,-1,-1 };
int dy[]{ 0,0,0,1,-1,1,0,1,-1,1,-1,-1,1 };
int dz[]{ 0,1,1,1,1,0,1,0,0,1,1,1,1 };

bool judge() {
	rep(t, 13)rep(i, n)rep(j, n)rep(k, n) {
		int x = i, y = j, z = k;
		int back = a[i][j][k], cnt = 0;
		while (x >= 0 && x < n&&y >= 0 && y < n&&z < n) {
			if (back != a[x][y][z])cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x += dx[t]; y += dy[t]; z += dz[t];
		}
	}
	return 0;
}
int main() {
	while (scanf("%d%d%d", &n, &m, &p), n) {
		memset(a, -1, sizeof(a));
		memset(h, 0, sizeof(h));
		bool ok = true;
		rep(i, p) {
			int x, y; scanf("%d%d", &x, &y); x--; y--;
			a[x][y][h[x][y]++] = i & 1;
			if (ok && judge()) {
				printf(i & 1 ? "White " : "Black ");
				printf("%d\n", i + 1);
				ok = false;
			}
		}
		if (ok)puts("Draw");
	}
}