#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 tate() {
	rep(k, n) {
		rep(i, n) {
			int back = a[i][0][k], cnt = 0;
			rep(j, n) {
				if (back != a[i][j][k])cnt = 0;
				back = a[i][j][k];
				if (++cnt >= m&&back != -1)return 1;
			}
		}
	}
	return 0;
}
int tateue() {
	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 < n&&z < n) {
			if (back != a[x][y][z])cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x++; z++;
		}
	}
	return 0;
}
int tatesita() {
	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 && z < n) {
			if (back != a[x][y][z])cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x--; z++;
		}
	}
	return 0;
}
int yokoue() {
	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 (y < n&&z < n) {
			if (back != a[x][y][z])cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			y++; z++;
		}
	}
	return 0;
}
int yokosita() {
	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 (y >= 0 && z < n) {
			if (back != a[x][y][z])cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			y--; z++;
		}
	}
	return 0;
}
int yoko() {
	rep(k, n) {
		rep(i, n) {
			int back = a[0][i][k], cnt = 0;
			rep(j, n) {
				if (back != a[j][i][k])cnt = 0;
				back = a[j][i][k];
				if (++cnt >= m&&back != -1)return 1;
			}
		}
	}
	return 0;
}
int ue() {
	rep(i, n) {
		rep(j, n) {
			int back = a[i][j][0], cnt = 0;
			rep(k, n) {
				if (back != a[i][j][k])cnt = 0;
				back = a[i][j][k];
				if (++cnt >= m&&back != -1)return 1;
			}
		}
	}
	return 0;
}
int naname() {
	rep(k, n) {
		rep(i, n)rep(j, n) {
			int x = i, y = j;
			int back = a[i][j][k], cnt = 0;
			while (x < n&&y < n) {
				if (a[x][y][k] != back)cnt = 0;
				back = a[x][y][k];
				if (++cnt >= m&&back != -1)return 1;
				x++; y++;
			}
		}
	}
	return 0;
}
int naname2() {
	rep(k, n)rep(i, n)rep(j, n) {
		int x = i, y = j;
		int back = a[i][j][k], cnt = 0;
		while (x < n&&y >= 0) {
			if (a[x][y][k] != back)cnt = 0;
			back = a[x][y][k];
			if (++cnt >= m&&back != -1)return 1;
			x++; y--;
		}
	}
	return 0;
}
int nanameue() {
	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 < n&&y < n&&k < n) {
			if (a[x][y][z] != back)cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x++; y++; z++;
		}
	}
	return 0;
}
int nanameue2() {
	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 < n&&y >= 0 && k < n) {
			if (a[x][y][z] != back)cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x++; y--; z++;
		}
	}
	return 0;
}
int nanameue3() {
	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 && y >= 0 && z < n) {
			if (a[x][y][z] != back)cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x--; y--; z++;
		}
	}
	return 0;
}
int nanameue4() {
	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 && y < n&&z < n) {
			if (a[x][y][z] != back)cnt = 0;
			back = a[x][y][z];
			if (++cnt >= m&&back != -1)return 1;
			x--; y++; z++;
		}
	}
	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 && (tate() || yoko() || ue() || naname() || nanameue() || naname2() || nanameue2() || nanameue3() || nanameue4() || tateue() || tatesita() || yokoue() || yokosita())) {
				printf(i & 1 ? "White " : "Black ");
				printf("%d\n", i + 1);
				ok = false;
			}
		}
		if (ok)puts("Draw");
	}
}

Measured memory_bytes: 3180