#include <bits/stdc++.h>
using namespace std;
long long int ds(long long int n) {
  long long int ss = 0;
  while (n) {
    ss += n % 10;
    n /= 10;
  }
  return ss;
}
int nss(int n) {
  int ss = 0;
  while (n) {
    ss += (n % 10) * (n % 10);
    n /= 10;
  }
  return ss;
}
bool happyn(int n) {
  int s, f;
  s = f = n;
  do {
    s = nss(s);
    f = nss(nss(f));
  } while (s != f);
  return (s == 1);
}
int findmaxsum(int *a, int n) {
  int inc = a[0];
  int exl = 0;
  int exl_new;
  int i;
  for (i = 1; i < n; i++) {
    exl_new = (inc > exl) ? inc : exl;
    inc = exl + a[i];
    exl = exl_new;
  }
  return ((inc > exl) ? inc : exl);
}
int maxor(int a, int n) {
  int maxi = 0, mask = 0;
  set<int> s;
  for (int i = 0; i < n; i++) {
    mask |= (1 << i);
    for (int j = 0; j < n; j++) {
    }
    int newmax = maxi | (1 << i);
  }
}
int A(int a, int b, int c) {
  int r = min(a, b / 2);
  a -= r;
  b -= 2 * r;
  r += min(b, c / 2);
  return r;
}
int B(int a, int b, int c) {
  int r = min(b, c / 2);
  b -= r;
  c -= 2 * r;
  r += min(a, b / 2);
  return r;
}
int C(int a, int b, int c) { return max(A(a, b, c), B(a, b, c)); }
int powf(long long int a, long long int p) {
  long long int ans = 1;
  while (p) {
    if (p & 1) ans = (ans * a) % 1000000007;
    p >>= 1;
    a = (a * a) % 1000000007;
  }
  return ans % 1000000007;
}
char a[140000];
int getcost(int l, int r, char ch) {
  int cnt = 0;
  for (int i = l; i <= r; i++)
    if (a[i] != ch) cnt++;
  return cnt;
}
int getmin(int l, int r, char ch) {
  if (l == r) {
    if (a[l] == ch)
      return 0;
    else
      return 1;
  }
  int mid = (l + r) / 2;
  return min(getcost(l, mid, ch) + getmin(mid + 1, r, ch + 1),
             getcost(mid + 1, r, ch) + getmin(l, mid, ch + 1));
}
const int maxn = 3e5 + 5;
struct node {
  long long int v;
  int id;
  bool operator<(const node &a) const {
    if (v == a.v)
      return id < a.id;
    else
      return v < a.v;
  }
};
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int a, b;
    cin >> a >> b;
    cout << (a ^ b) << endl;
  }
}

### Prompt

Please create a solution in cpp to the following problem:

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

Tzuyu gave Sana two integers a and b and a really important quest.

In order to complete the quest, Sana has to output the smallest possible value of (a ⊕ x) + (b ⊕ x) for any given x, where ⊕ denotes the [bitwise XOR operation](http://en.wikipedia.org/wiki/Bitwise_operation#XOR). 

Input

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

The only line of each test case contains two integers a and b (1 ≤ a, b ≤ 10^{9}).

Output

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

Example

Input


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


Output


10
13
891
18
6237
0

Note

For the first test case Sana can choose x=4 and the value will be (6 ⊕ 4) + (12 ⊕ 4) = 2 + 8 = 10. It can be shown that this is the smallest possible value.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long int ds(long long int n) {
  long long int ss = 0;
  while (n) {
    ss += n % 10;
    n /= 10;
  }
  return ss;
}
int nss(int n) {
  int ss = 0;
  while (n) {
    ss += (n % 10) * (n % 10);
    n /= 10;
  }
  return ss;
}
bool happyn(int n) {
  int s, f;
  s = f = n;
  do {
    s = nss(s);
    f = nss(nss(f));
  } while (s != f);
  return (s == 1);
}
int findmaxsum(int *a, int n) {
  int inc = a[0];
  int exl = 0;
  int exl_new;
  int i;
  for (i = 1; i < n; i++) {
    exl_new = (inc > exl) ? inc : exl;
    inc = exl + a[i];
    exl = exl_new;
  }
  return ((inc > exl) ? inc : exl);
}
int maxor(int a, int n) {
  int maxi = 0, mask = 0;
  set<int> s;
  for (int i = 0; i < n; i++) {
    mask |= (1 << i);
    for (int j = 0; j < n; j++) {
    }
    int newmax = maxi | (1 << i);
  }
}
int A(int a, int b, int c) {
  int r = min(a, b / 2);
  a -= r;
  b -= 2 * r;
  r += min(b, c / 2);
  return r;
}
int B(int a, int b, int c) {
  int r = min(b, c / 2);
  b -= r;
  c -= 2 * r;
  r += min(a, b / 2);
  return r;
}
int C(int a, int b, int c) { return max(A(a, b, c), B(a, b, c)); }
int powf(long long int a, long long int p) {
  long long int ans = 1;
  while (p) {
    if (p & 1) ans = (ans * a) % 1000000007;
    p >>= 1;
    a = (a * a) % 1000000007;
  }
  return ans % 1000000007;
}
char a[140000];
int getcost(int l, int r, char ch) {
  int cnt = 0;
  for (int i = l; i <= r; i++)
    if (a[i] != ch) cnt++;
  return cnt;
}
int getmin(int l, int r, char ch) {
  if (l == r) {
    if (a[l] == ch)
      return 0;
    else
      return 1;
  }
  int mid = (l + r) / 2;
  return min(getcost(l, mid, ch) + getmin(mid + 1, r, ch + 1),
             getcost(mid + 1, r, ch) + getmin(l, mid, ch + 1));
}
const int maxn = 3e5 + 5;
struct node {
  long long int v;
  int id;
  bool operator<(const node &a) const {
    if (v == a.v)
      return id < a.id;
    else
      return v < a.v;
  }
};
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int a, b;
    cin >> a >> b;
    cout << (a ^ b) << endl;
  }
}

```