{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe well-known grand-master Bender arrives at the city of Petrozavodsk. Among others, there were Ha, Ru and Po to come to the simultaneous chess-game. Ru had lost the game \u003ci\u003eN\u003c/i\u003e (1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e) times, Po had lost the game \u003ci\u003eM\u003c/i\u003e (1 ≤ \u003ci\u003eM\u003c/i\u003e ≤ 10\u003csup\u003e1000\u003c/sup\u003e) times, and Ha hadn\u0027t 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\r\nshame, 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\u0027s notes whether Ostap cheated during play, or not.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe rules of chess, as known by Ostap, are much like the common ones, but Ostap doesn\u0027t know such concepts as \u003ci\u003een passant\u003c/i\u003e, \u003ci\u003ecastling\u003c/i\u003e and \u003ci\u003epromotion\u003c/i\u003e. Otherwise, the pieces move just like the usual chess-pieces do. A player\u0027s move is considered legal if the only piece moved is this player\u0027s piece, and his king isn\u0027t 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 is no legal moves. Stalemate (a draw) is a position when neither king is in check, and there is no legal moves. The initial position may be senseless; it needn\u0027t be verified before the first move.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe current position is given as 64 numbers, delimited with spaces or\r\nnew-lines. The number 0 corresponds to an empty square, 1\u0026nbsp;— to pawn, 2\u0026nbsp;— to knight, 3\u0026nbsp;— to bishop, 4\u0026nbsp;— to rock, 5\u0026nbsp;— to queen, 6\u0026nbsp;— to king. The positive numbers correspond to white pieces, and their negative counterparts\u0026nbsp;— to black ones. A number 1 ≤ \u003ci\u003eP\u003c/i\u003e ≤ 60 follows, which gives the number of moves written down by Ha.\r\nFollowing is the color of player to move, either \u0027White\u0027 or \u0027Black\u0027.\r\nAt last, the \u003ci\u003eP\u003c/i\u003e moves are given, formatted as square-square, where\r\na square is a letter a-h (a corresponding to the leftmost file, h to\r\nthe rightmost) followed by a number 1-8 (1 corresponding to the\r\nbottommost rank, 8 to the topmost).\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eFor each move, your program must output either of the following messages:\r\n\"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.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e-4 -2 -3 -5 -6 -3 -2 -4\r\n-1 -1 -1 -1 -1 -1 -1 -1\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n1 1 1 1 1 1 1 1\r\n4 2 3 5 6 3 2 4\r\n2\r\nWhite\r\ne2-e4\r\ne7-e4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCorrect\r\nIncorrect\r\n\r\n-4 -2 -3 -5 -6 -3 -2 -4\r\n-1 -1 -1 -1 -1 -1 -1 -1\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 1 0 0 0\r\n0 0 0 0 0 0 0 0\r\n1 1 1 1 0 1 1 1\r\n4 2 3 5 6 3 2 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e-4 -2 -3 -5 -6 -3 -2 -4\r\n-1 -1 -1 -1 -1 -1 -1 -1\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n1 1 1 1 1 1 1 1\r\n4 2 3 5 6 3 2 4\r\n8\r\nWhite\r\ne2-e4\r\ne7-e5\r\nd1-f3\r\nh7-h6\r\nf1-c4\r\ng7-g6\r\nf3-f7\r\ne8-f7\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCorrect\r\nCorrect\r\nCorrect\r\nCorrect\r\nCorrect\r\nCorrect\r\nMate\r\n\r\n-4 -2 -3 -5 -6 -3 -2 -4\r\n-1 -1 -1 -1 0 5 0 0\r\n0 0 0 0 0 0 -1 -1\r\n0 0 0 0 -1 0 0 0\r\n0 0 3 0 1 0 0 0\r\n0 0 0 0 0 0 0 0\r\n1 1 1 1 0 1 1 1\r\n4 2 3 0 6 0 2 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e0 0 0 0 0 6 0 -6\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 5\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n1\r\nWhite\r\nh6-a6\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCorrect\r\n\r\n0 0 0 0 0 6 0 -6\r\n0 0 0 0 0 0 0 0\r\n5 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n0 0 0 0 0 0 0 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}