Fix the Matrix

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

Firstly, you need to output the matrix HH of size 6×66 \times 6 filled with characters 'A' and 'B'.

In each of the requests the interactor will perform one of the following actions on matrix HH to obtain the new matrix TT:

  1. Change at most one character in each row of matrix HH and reorder its rows in an arbitrary manner.
  2. Change at most one character in each column of matrix HH and reorder its columns in an arbitrary manner.

Operation of character changing means replacing some character 'A' with character 'B' or vice versa.

In each step you are to find out what type of action did the interactor perform. Also, it is necessary to determine for each row or column (depends on the action type) of matrix TT its position in the original matrix HH.

Note that the exact order used by interactor is required. For example, if the whole matrix HH consists of characters 'A' and interactor changed no characters but reordered some rows, the output with original or any other order, except for the one that is used by the interactor, would be considered incorrect. That is why it does not make sense to use, for example, matrix HH with duplicate rows or columns.

You are to write a program that fills the matrix HH and responds correctly to all requests from the interactor program.

It is possible that the same matrix can be obtained by performing action of either the first or the second type. In this case you are allowed to output both these variants, one after another. Your response will be considered correct if at least one variant is identical to that performed by the interactor.

입력

After your program has output matrix HH, the interactor will start to provide your program with requests. For each request it will perform some type of action on the original matrix HH to obtain the result matrix TT. Type of action (first or second) and order for rows or columns can be chosen by interactor depending on both matrix HH and test case. Each request starts with a line "Request" (quotes for clarity). This line is followed by six lines containing six characters each --- the matrix TT.

After recieving line "Accepted", your program should be terminated immediately.

It is guaranteed that there will be no more than 100100 requests and in each of them the interactor will provide you with a correct matrix TT.

출력

Firstly your program should output six lines containing six characters each --- the initial matrix HH. Each character should be either 'A' or 'B'. 

For each of the following requests from the interactor your program should output either two or three lines.

  • If there are two possible actions with different action types that lead to the same matrix your program should output three lines. On the first line there should be the only integer 00 (zero) denoting that there are two possible action types. The second line should describe the possible action of the first type and contain six space-separated integers --- ii-th integer is the index of ii-th row of matrix TT in the original matrix HH. Similarly, the third line should describe the possible action of the second type and contain six space-separated integers --- ii-th integer is the index of ii-th column of matrix TT in the original matrix HH.
  • If there is the only possible action type your program should output two lines. On the first line there should be the only integer tt --- the type of action performed by the interactor. The second line should contain six space-separated integers --- ii-th integer is the index of ii-th row or column (depends on the action type) of matrix TT in the original matrix HH.

All rows are numbered with sequential integers from 11 to 66 from top to bottom, all columns are numbered in the same way from left to right.