Two players play a three-dimensional variant of Tic-Tac-Toe. They drop balls into a cubic board and try to form a straight run of balls of a fixed length. Your task is to simulate such games and report the winner of each one.
A game is controlled by two parameters: the board size $n$ and the target sequence length $m$.
The exact rules are as follows.
A sequence may run along an axis or along a diagonal. There are exactly 13 distinct directions; opposite directions are treated as the same one.
You are given the record of each game and must decide who wins.
Because three-dimensional runs are hard for people to notice, players sometimes keep going after the game is already decided. Every move made after the winner is determined must be ignored: only the first $m$-sequence counts, and any later sequences do not change the winner.
A game need not end in a victory. If no peg can accept another ball, the game is a draw. A game may also be abandoned before any $m$-sequence is formed, which is also a draw.
The input consists of several datasets, each recording one game.
A dataset begins with a line containing three positive integers $n$, $m$, and $p$ separated by single spaces, where $3 \le m \le n \le 7$ and $1 \le p \le n^3$. Here $n$ and $m$ are the board size and the sequence length, and $p$ is the number of moves played.
Each of the next $p$ lines contains two positive integers $x$ and $y$ ($1 \le x, y \le n$): the player to move drops a ball on peg $(x, y)$. No peg ever receives more than $n$ balls during a game.
The end of the input is a line containing three zeros: 0 0 0. It is not part of any dataset.
For each dataset, print exactly one line.
If a player wins, print the winner (Black or White), then a single space, then the number of the move on which the game was decided. If the game ends in a draw, print Draw. Do not print any other characters.