King and Pawn

No attempts yetTime limit1sMemory limit128 MB

Problem

King and Pawn is a small game played on a chessboard.

White has one king and black has one pawn. On its turn the king moves one square in any of the eight directions, straight or diagonal. On its turn the pawn moves one square down. Both sides must move on their turn, and neither may stay where it is.

The board has forbidden cells and danger cells. Neither side may enter a forbidden cell. Only the black pawn may pass through a danger cell, so the king may not step onto one even to capture the pawn. The danger cells drawn on the board keep their place for the whole game, and on top of them up to two more danger cells travel with the pawn. Those two sit immediately below and to the left and immediately below and to the right of the pawn, and they come down with it. A travelling cell that leaves the board or lands on a forbidden cell does not count. Every remaining cell is open, and both sides may use it.

The picture below shows a board. F is a forbidden cell, D is a danger cell, . is an open cell, and P and K are the pawn and the king.

........
..P....D
.D.D..K.
.....F..
..DDD...
..DFDD..
..DDD...
........

The picture alone does not say whether the cells under the pawn and the king are open or dangerous, and it does not say whether the danger cells under the pawn are fixed or travelling with it.

The descending pawn can leave the king standing on a danger cell, which costs the king nothing because it steps away on its turn. The pawn never wins by catching the king with a travelling danger cell. The king, on the other hand, blocks the pawn by taking the square directly below it.

The winning conditions are:

  • the king moves onto the pawn's cell and captures it: white wins;
  • it is the king's turn and no cell is open to it: black wins;
  • it is the pawn's turn and it cannot move down: black wins when the pawn stands on the bottom row, white wins otherwise.

White always moves first, and the king always steps onto the square that is best for it. Work out who wins from the given board.

Input

The first line contains the number of test cases.

Each test case takes ten lines. The first eight give the board one row at a time, starting from the top row. F is a forbidden cell, D is a danger cell, and . is an open cell. Only fixed danger cells appear here; the cells that travel with the pawn are not drawn.

The next two lines give the coordinates of the white king, xkx_k yky_k (1xk,yk81 \le x_k, y_k \le 8), and then the coordinates of the black pawn, xpx_p ypy_p (1xp,yp81 \le x_p, y_p \le 8). xx counts from the left and yy counts from the bottom, so the first board line is y=8y = 8 and the last one is y=1y = 1.

The king's starting cell is neither a forbidden cell nor a fixed danger cell. The pawn's starting cell is not a forbidden cell, and it differs from the king's.

Output

For each test case print one line: White if the white king wins, Black if the black pawn wins.