There are N lights, numbered from 1 to N. Initially all of them are switched off. We will consider M days. We represent the state of each day as a string of length N, whose $$i^{th}$$ character is 1 if the $$i^{th}$$ light on that day was switched on, and 0 otherwise. Each day one of the following things will happen:
1 L R: All the lights numbered from L to R are flipped, i.e, lights are turned off if they were switched on and vice versa.
2 A B L R: For each light from L to R, count on how many days from $$A^{th}$$ day to $$B^{th}$$ day, this light was on (Let it be x). Print how many lights (from L to R) are there which were switched on a total odd number of days (i.e, $$x\bmod2 = 1$$). Also, print the minimum id of light (from L to R), which was switched on a total odd number of days (considering from Ath day to Bth day). State of lights does not change in this type of query.
3 : Considering states of all the days till now, which day had the lexicographically largest state (if multiple, print the earliest day). State of lights does not change in this type of query.
Input Format
First line contains a single integer $$T$$ ($$1 \le T \le 10$$), the number of test cases.
The first line of each test contains two integers, $$N$$ ($$1 \le N \le 10^{5}$$) and $$M$$ ($$1 \le M \le 10^{4}$$), where $$N$$ denotes the number of ligths and $$M$$ denotes the number of days.
Each of the next $$M$$ lines starts with an integer $$K$$ ($$1 \le K \le 3$$) which represents the type of query. If $$K$$ is $$1$$, it will be followed by two integers $$L$$ and $$R$$ ($$1 \le L \le R \le N$$). If $$K$$ is $$2$$, it will be followed by four integers $$A$$, $$B$$, $$L$$ and $$R$$ ($$1 \le L \le R \le N$$, $$1 \le A \le B \le X$$), where X is the current day number. If $$K$$ is $$3$$, it will be the only integer in that line.
Output Format
For all the queries that are of type $$2$$ and type $$3$$, print the required answer. In second type of query if no light between L and R was switched on a total odd number of days (between Ath day and Bth day), print "0 0" (without quotes). Also, in third type of query, if there is no change in the state of lights (from 0th day), print "0" (without quotes).
In the first test case of the given sample:
State on 0th day: 00000000 (Initial State)
State on 1st day: 00111100
State on 2nd day: 00111100 (remains same). On 1st day, among lights from 1 to 4, 3rd and 4th lights (total 2 lights) were switched on a total odd number (1) of days. Also, minimum id of light (which was switched on a total odd number of days) is 3. So "2 3" should be printed.
State on 3rd day: 00111100 (remains same). On 1st day, among lights from 1 to 8, 3rd, 4th, 5th and 6th lights (total 4 lights) were switched on a total odd number (1) of days. Also, minimum id of light is 3. So "4 3" should be printed.
State on 4th day: 00110000
State on 5th day: 00110000 (remains same). Considering first 5 days, 3rd and 4th lights were switched on 5 days. Also, 5th and 6th lights were switched on 3 days. So, 3rd, 4th, 5th and 6th lights (total 4 lights) were switched on a total odd number of days. Also, minimum id of light is 3. So "4 3" should be printed.
State on 6th day: 00110000 (remains same). Considering first 6 days, 3rd and 4th lights were switched on 6 days. 5th and 6th lights were switched on 3 days. So, 5th and 6th lights (total 2 lights) were switched on a total odd number of days. Also, minimum id of light is 5. So "2 5" should be printed.
State on 7th day: 00110000 (remains same). On 1st day, state was lexicographically largest. So "1" should be printed.
In the second test case of the given sample:
State on 0th day: 00000
State on 1st day: 00000 (remains same). Since no light from 1 to 5 was switched on a total odd number of days on 1st day, "0 0" should be printed.
State on 2nd day: 00000 (remains same). Since there is no change in state, "0" should be printed.