## Problem

Time Limit:
Memory Limit:

### Description

Given an matrix , whose elements are either or . means the number in the row and column. Initially we have .
We can change the matrix in the following way. Given a rectangle whose upper-left corner is and lower-right corner is , we change all the elements in the rectangle by using “not” operation (if it is a ‘’ then change it into ‘’ otherwise change it into ‘’). To maintain the information of the matrix, you are asked to write a program to receive and execute two kinds of instructions.

1. () changes the matrix by using the rectangle whose upper-left corner is and lower-right corner is .
2. () querys .

### Input

The first line of the input is an integer representing the number of test cases. The following X blocks each represents a test case.
The first line of each block contains two numbers and (, ) representing the size of the matrix and the number of the instructions. The following lines each represents an instruction having the format “ ” or “ ”, which has been described above.

### Output

For each querying output one line, which has an integer representing .
There is a blank line between every two continuous test cases.