XOR-ing Murad#9030

XOR-ing Murad

2 seconds
128 megabytes
Easy

Murad likes operation very much. All the day he calculates the of different numbers.

Now Murad has the next problem. He is given array of size . Murad must answer queries. The queries can be of two types:

1) - in this query on a segment [, ] (1 \leq l < r \leq n) you need to find the sum of all pairwise , that is, the value

![xorimg.png](https://static.e-olymp.com/content/47/47f200995dc1af304e0ec010ba29b005f62651f3.png)

2) - in this query on a segment [, ] (1 \leq l \leq r \leq n) you need to all elements with .

**Warning**: here is a bit operation .

Input

First line contains two numbers and (2 \leq n \leq 2 \cdot 10^5, 1 \leq q \leq 10^5) - the size of array and the number of queries. The next line contains elements of the array a_i (0 \leq a_i \leq 10^9).

The next lines contain the queries. First comes the query type: either or . If the query is of type , then two numbers are given and (1 \leq l < r \leq n). If the query is of type , then three numbers are given , and (1 \leq l \leq r \leq n, 0 \leq v \leq 10^9).

Output

Print the answers to all queries of type .

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading