codeforces#P1421A. XORwice

XORwice

Description

In order to celebrate Twice's 5th anniversary, Tzuyu and Sana decided to play a game.

Tzuyu gave Sana two integers aa and bb and a really important quest.

In order to complete the quest, Sana has to output the smallest possible value of (axa \oplus x) + (bxb \oplus x) for any given xx, where \oplus denotes the bitwise XOR operation.

Each test contains multiple test cases. The first line contains the number of test cases tt (1t1041 \le t \le 10^{4}). Description of the test cases follows.

The only line of each test case contains two integers aa and bb (1a,b1091 \le a, b \le 10^{9}).

For each testcase, output the smallest possible value of the given expression.

Input

Each test contains multiple test cases. The first line contains the number of test cases tt (1t1041 \le t \le 10^{4}). Description of the test cases follows.

The only line of each test case contains two integers aa and bb (1a,b1091 \le a, b \le 10^{9}).

Output

For each testcase, output the smallest possible value of the given expression.

Samples

输入数据 1

6
6 12
4 9
59 832
28 14
4925 2912
1 1

输出数据 1

10
13
891
18
6237
0

Note

For the first test case Sana can choose x=4x=4 and the value will be (646 \oplus 4) + (12412 \oplus 4) = 2+82 + 8 = 1010. It can be shown that this is the smallest possible value.