F. ZigXor
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Sherlock Holmes has uncovered a secret society led by his archenemy — Professor Moriarty. Each member of this criminal network possesses a mysterious integer known as their Cipher Code.

Whenever two members meet, they produce a Conspiracy Signal equal to the bitwise XOR of their cipher codes.

Holmes is interested in analyzing entire groups of suspects. For any group, he defines the Grand Conspiracy Signal as the XOR of the Conspiracy Signals produced by every pair of suspects in the group.

Formally, for a range of suspects from index $$$l$$$ to $$$r$$$, the Grand Conspiracy Signal is:

$$$$$$ \bigoplus_{l \le i \lt j \le r} (a_i \oplus a_j) $$$$$$

However, the investigation is ongoing, and Dr. Watson frequently updates the suspects' cipher codes as new evidence appears.

Your task is to help Sherlock Holmes process the updates and answer his queries.

where $$$\oplus$$$ denotes the bitwise XOR operation.

Constraints

$$$1 \le n, q \le 2 \times 10^5$$$ ; $$$0 \le a_i, \text{val} \lt 10^{7}$$$ ; $$$1 \le \text{pos} \le n$$$ ; $$$1 \le l \le r \le n$$$

Input

The first line contains two integers $$$n$$$ and $$$q$$$ — the number of suspects and the number of operations.

The second line contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ — the Cipher Code of each suspect.

Each of the next $$$q$$$ lines describes an operation:

• $$$1\ \text{pos}\ \text{val}$$$ — Watson updates the evidence. Set the Cipher Code of suspect $$$\text{pos}$$$ to $$$\text{val}$$$.

• $$$2\ l\ r$$$ — Holmes asks for the Grand Conspiracy Signal of suspects from $$$l$$$ to $$$r$$$.

Output

For each operation of type 2, output a single integer — the Grand Conspiracy Signal for the requested range.

Example
Input
5 4
1 2 3 4 5
2 1 4
2 2 4
1 2 3
2 1 4
Output
4
0
5