The array is given. Find the value of XOR (bitwise exclusive or) on the segment.
The first line contains the number of array elements.
The second line contains integers — the elements of the array .
The third line contains the number of XOR requests on the segment.
Each of the following lines contains two integers and — the boundaries of the array segment where you must find XOR.
For each query, print in a separate line the XOR of elements on the corresponding segment of array (including borders).