An Array and XOR
Given an integer , an array of non-negative integers of length , and queries of the form , . All elements of array are less than .
Let us define the function , where denotes the bitwise exclusive OR operation. For each query, you need to find the value .
Bitwise exclusive OR of non-negative integers and equals a non-negative integer that has a 1 in a certain position in its binary representation if and only if the binary representations of and have different values in that position. For example, .
Input
The first line contains three integers , , (, , ), representing the length of the array, the number of queries, and the limit on the elements of the array, respectively.
The second line contains integers (), representing the elements of the array.
The following lines each contain two integers and (), representing the parameters of the -th query.
Output
For each -th query, output a single integer on a separate line — the value of .
Examples
Note
The first query.
The answer to this query is equal to .
Scoring
( points): , , ;
( points): , , ;
( points): ; for ;
( points): , ;
( points): , ;
( points): no additional constraints.