Given two integers and , what is the XOR (exclusive-or) of all numbers between and (inclusive)?
The first line of input is the integer , which is the number of test cases .
lines follow, with each line containing two integers and .
For each test case, output the (decimal) value of the XOR of all numbers between and , inclusive.
5 3 10 5 5 13 42 666 1337 1234567 89101112
Output for Sample Input
8 5 39 0 89998783