A base station controls two robots. The first robot carries the number , the second one carries the number .
Before they start working, the station broadcasts a key - a single non-negative integer that both robots receive. A robot then spends energy equal to its own number XOR the key, so together the two robots spend
where denotes the bitwise XOR operation.
The station picks the key, and it can be any non-negative integer. Choose it so that the total spent energy is as small as possible, and print that smallest total.
Input
First line of input will be a single integer - the number of testcases.
Each of the next lines contains two integers and - the numbers the two robots carry.
Output
For every testcase print a single line with the smallest possible total energy.
Example
3 6 12 4 9 5 5
10 13 0
In the first testcase the key gives , and no other key does better. In the third testcase both robots carry the same number, so the key empties them both.
Constraints
This problem was adapted from XORwice, problem A of Codeforces Round 676 (Div. 2).