#BT69. BitPlay69

BitPlay69

You are given 2 integers N and M.

Print the smallest K, such that N ⊕ K > M. Here, is the Bitwise XOR Operator.

Input

The first line contains a single integer T (1 ≤ T ≤ 100) - The number of test cases.

The first and only line of each test case contains 2 integers N and M (1 ≤ N, M ≤ 1017)

Output

A single integer - K.

Example

Input:
4
3 5
3 2
69 696
696 96

Output: 4 0 640 0

</p>