XORanges
Janez loves oranges! So he made a scanner for oranges. With a cameras and a Raspberry Pi 3b+ computer, he started creating 3D images of oranges. His image processor is not a very good one, so the only output he gets is a -bit integer, which holds information about the holes on the peel. A -bit integer is represented as a sequence of digits (bits) each of which is one or zero. If we start from we can obtain by adding for every -th bit that is equal to one. More formally the number is represented by the sequence when . For example, is represented as .
Janez scanned oranges; however, sometimes he decides to rescan one of the oranges (-th orange) during the execution of your program. This means that from this scan on, he uses the updated value for the -th orange.
Janez wants to analyse those oranges. He finds exclusive or (XOR) operation very interesting, so he decides to make some calculations. He selects a range of oranges from to (where ) and wants to find out the value of XOR of all elements in that range, all pairs of consecutive elements in that range, all sequences of consecutive elements and so on up to the sequence of consecutive elements (all elements in the range).
If and and there is an array of scanned values , program should return the value of , where represents the XOR and represents the -th element in array .
Let XOR operation be defined as:
If the -th bit of the first value is the same as the -th bit of the second value, the -th bit of the result is ;
If the -th bit of the first value is different as the -th bit of the second value, the -th bit of the result is .
For example, .
Input
In the first line there are positive integers and (total number of rescans and queries — actions).
In the next line, there are non-negative integers, which represent values of the array (scan results for oranges). Element contains the value for -th orange. Index starts with .
Actions are described in the next lines with three positive integers.
If the action type is (rescan), the first integer equals and is followed by (index of an orange that Janez wants to rescan) and (the result of the rescan of the -th orange).
If the action type is (query), the first integer equals and is followed by and .
Output
You should print exactly one integer for each query with the matching result for the query. You should print every value in a new line. Note that the -th line of the output should match the result of the -th query.
Examples
Explanation to the example 1.
At the begining, . The first query is on the full range. The result of the analysis is .
Then the value of the first orange is updated to . This leads to a change on the same query (on a range ) .