|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||256 MB||11||3||3||50.000%|
Firstly, you need to output the matrix $H$ of size $6 \times 6$ filled with characters '
A' and '
In each of the requests the interactor will perform one of the following actions on matrix $H$ to obtain the new matrix $T$:
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 $T$ its position in the original matrix $H$.
Note that the exact order used by interactor is required. For example, if the whole matrix $H$ 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 $H$ with duplicate rows or columns.
You are to write a program that fills the matrix $H$ 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 $H$, the interactor will start to provide your program with requests. For each request it will perform some type of action on the original matrix $H$ to obtain the result matrix $T$. Type of action (first or second) and order for rows or columns can be chosen by interactor depending on both matrix $H$ 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 $T$.
After recieving line "
Accepted", your program should be terminated immediately.
It is guaranteed that there will be no more than $100$ requests and in each of them the interactor will provide you with a correct matrix $T$.
Firstly your program should output six lines containing six characters each --- the initial matrix $H$. Each character should be either '
A' or '
For each of the following requests from the interactor your program should output either two or three lines.
All rows are numbered with sequential integers from $1$ to $6$ from top to bottom, all columns are numbered in the same way from left to right.
Request AAABAA BBAAAB BBBBBB BABABB ABABAB AAABBA Request AABAAA BBBBBB AAABBB AABBAB BBAABA BABAAA Accepted
AAAAAA BBBBBB AAABBB ABABAB BABABA BBAAAA 1 1 6 2 5 4 3 2 1 3 2 4 5 6