The first line contains one integer, denoting the number of test cases.
For each test case:
The first line contains four integers, denoting the size of given matrix and the size of chosen submatrices respectively.
The nextlines each contains
integers
, denoting the entrys of matrix
.
It's guaranteed that.
lines each containing a string "^_^" or "QAQ", denoting the answer to each test case.