Ostap`s Chess#3441

Ostap`s Chess

1 second
64 megabytes
Easy

The well-known grand-master Bender arrives at the city of Bergstadt. Among others, there were Ha, Ru and Po to come to the simultaneous chess-game. Ru had lost the game (1 \leq N \leq 10^9) times, Po had lost the game (1 \leq M \leq 10^{1000}) times, and Ha hadn't counted his losses as all. The friends had noticed that Bender played in his own style: the chess-pieces occasionally disappeared from the board, or new pieces occasionally appeared. Bender has no shame, and he can do the cheats with any chess-piece. Then Ha got tired of these games, and he decided to start writing down the moves, having written down the current position first. You have to tell from Ha's notes whether Ostap cheated during play, or not.

The rules of chess, as known by Ostap, are much like the common ones, but Ostap doesn't know such concepts as en passant, castling and promotion. Otherwise, the pieces move just like the usual chess-pieces do. A player's move is considered legal if the only piece moved is this player's piece, and his king isn't in check at the end of the move. A king is considered in check when its location is under attack of a hostile piece, and checkmated when, in addition to this, there are no legal moves. Stalemate (a draw) is a position when neither king is in check, and there are no legal moves. The initial position may be senseless; it needn't be verified before the first move.

Input

The current position is given as numbers, delimited with spaces or new-lines. The number corresponds to an empty square, — to pawn, — to knight, — to bishop, — to rook, — to queen, — to king. The positive numbers correspond to white pieces, and their negative counterparts — to black ones. A number (1 \leq P \leq 60) follows, which gives the number of moves written down by Ha. Following is the color of player to move, either White or Black. At last, the moves are given, formatted as square-square, where a square is a letter - ( corresponding to the leftmost file, to the rightmost) followed by a number - ( corresponding to the bottommost rank, to the topmost).

Output

For each move, your program must output either of the following messages: "Incorrect" — for illegal move,"Mate" — for checkmate, "Check" — for check, "Draw" — for stalemate, "Correct" — for neither of the above. After an illegal move, checkmate or stalemate, the program must output an empty line followed by the current position, formatted in the same way as the input, without performing the illegal move. The moves following the illegal move, checkmate or stalemate must be ignored.

Examples

Example 1

Loading
Loading