#include <iostream>
#include <algorithm>

using namespace std;

struct Ver{
  int x;
  int y;
  int z;
};

int xdir[13] = {-1, 0, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1};
int ydir[13] = {-1, -1, -1, 0, -1, -1, -1, 0, 0, 0, 1, 1, 1};
int zdir[13] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1};

bool search(int a[9][9][9], int x, int y, int z, int dx, int dy, int dz, int m, int c, int clr)
{
  if(c == m){
    return true;
  }

  if(a[x+dx][y+dy][z+dz] == clr){
    return search(a, x+dx, y+dy, z+dz, dx, dy, dz, m, c+1, clr);
  }

  return false;
}

bool func(int a[9][9][9], int ct[9][9], int n, int m, int clr, Ver vr[344], int k)
{
  bool f = false;

  for(int i = ((clr==1)?1:2); i <= k; i+=2){
    for(int j = 0; j < 13; j++){
      int s=vr[i].x+xdir[j], t=vr[i].y+ydir[j], u=vr[i].z+zdir[j];
      if(a[s][t][u] == clr){
	f = search(a, s, t, u, xdir[j], ydir[j], zdir[j], m, 2, clr);
	if(f){
	  break;
	}
      }
      s=vr[i].x-xdir[j];
      t=vr[i].y-ydir[j];
      u=vr[i].z-zdir[j];
      if(a[s][t][u] == clr){
	f = search(a, s, t, u, -xdir[j], -ydir[j], -zdir[j], m, 1, clr);
	if(f){
	  break;
	}
      }
    }
    if(f){
      break;
    }
  }

  return f;
}

int main()
{
  int n, m, p, s, t, u, a[9][9][9], ct[9][9];
  Ver vr[344];

  while(1){
    cin >> n >> m >> p;
    if(n == 0 && m == 0 && p == 0){
      break;
    }
    fill(&a[0][0][0], &a[8][8][8], 0);
    fill(&ct[0][0], &ct[8][8], 1);
    u = 1;
    bool f = false;
    for(int k = 1; k <= p; k++){
      cin >> s >> t;
      if(f){
	continue;
      }
      vr[k].x = s;
      vr[k].y = t;
      vr[k].z = ct[s][t];
      a[s][t][ct[s][t]++] = u;
      if(func(a, ct, n, m, u, vr, k)){
	cout << ((u == 1)? "Black ":"White ") << k << endl;
	f = true;
	continue;
      }
      u = -u;
    }

    if(!f){
      cout << "Draw" << endl;
    }
  }

  return 0;
}