Endgame
The chess game was approaching its conclusion, with only two pieces left on the board: the white and black kings. However, in a twist from traditional chess rules, the players decided to play until the very end, following the motto "Only one should remain!" For security reasons, the kings were replaced by "guards." A guard is a piece that moves exactly one square horizontally or vertically per turn and can capture pieces on these same squares.
Your task is to determine the outcome of the game with optimal play from both players.
Input
The input specifies the positions of the guards (first the coordinates of the white guard, then the black guard), followed by information on who will move first (the symbol 'B' if the black guard moves first, and the symbol 'W' if the white guard moves first).
The positions are given in standard chess notation: first, the column of the chessboard is indicated (a lowercase Latin letter from a to h), followed by the row number (a digit from 1 to 8).
Output
You need to output the result of the game with optimal play from both opponents:
White wins - if the white guard wins,
Black wins - if the black guard wins,
Draw - if the game ends in a draw.
The game results in a draw if neither player can achieve a win. A side wins when its guard "captures" the opponent's guard. Initially, the guards can be placed anywhere on the board, except they cannot occupy the same square.