The chess problem.#8

The chess problem.

1 second
256 megabytes
Medium

During the algorithms exam, Petrik got an unlucky problem, so he asks for your help. You are given the standard chessboard 8 \times 8, whose cells are numbered from left to right from to and from bottom to top from 1 to 8. Among the white pieces on the board, there can be all types of pieces except the king, while among the black pieces, on the contrary, there is only one king. It is also known that the pieces are placed absolutely arbitrarily, that is, their placement may not be subject to the standard rules of chess (white ones can even have too many pieces of a certain type). Your task is to determine the position of the black player: checkmate, stalemate, or a normal position.

Chess rules:

Rules for attacking / moving pieces within the problem:

Input

The input data contains 8 lines, each of which consists of 8 characters. Each character indicates the corresponding cell on the chessboard:

  • the character «.» indicates an empty cell

  • the character «p» indicates a pawn

  • the character «r» indicates a rook

  • the character «n» indicates a knight

  • the character «b» indicates a bishop

  • the character «Q» indicates a queen

  • the character «K» indicates a king

It is guaranteed that there is exactly one king.

Output

If the king is in checkmate, output «Checkmate» in the first line, and output all the pieces that attack it in any order in the following lines.

If the king is in stalemate, output «Stalemate» on the first line.

Otherwise, output «Continue» and all the cells in which the king can make a move in any order.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Example 4

Loading
Loading