Kazari, a girl who can travel through time, is playing chess on a number axis.
At the very beginning, there is a chess at position $0$.
Then $q$ events occurs in sequence, each of which belongs to one of the following five types:
* 1 x She places a chess at position $x$.
* 2 x She places a chess at position $z$ if there exists chess at position $y$ where $|y - z| \le x$.
* 3 l r She reverses $[l, r]$, i.e., each chess at position $x$ $(l \le x \le r)$ moves to position $r + l - x$.
* 4 x She travels to the time right after the $x$-th event.
* 5 x She checks if there exists chess at position $x$.
During the game, Kazari will tell you the $q$ events in sequence. You are curious about the checking results of type-5 events, and decide to work out it timely according to the given information.
In order to keep your algorithm online, the input has been encrypted. You should `XOR` the current number of type-5 events whose result is `Yes` to each $l, r$ and $x$, to get the real input.