#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const int MX = 2e5 + 5;
const int MOD = 1e9 + 7;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
const int xd[4] = {1, 0, -1, 0}, yd[4] = {0, 1, 0, -1};
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
constexpr int pct(int x) { return __builtin_popcount(x); }
constexpr int bits(int x) { return 31 - __builtin_clz(x); }
template <class T>
T cdiv(T a, T b) {
  return a / b + !(a < 0 || a % b == 0);
}
int fstTrue(function<bool(int)> first, int lo, int hi) {
  hi++;
  assert(lo <= hi);
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    first(mid) ? hi = mid : lo = mid + 1;
  }
  return lo;
}
template <class T>
void remDup(vector<T>& v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << h;
  if (sizeof...(t)) cerr << ", ";
  DBG(t...);
}
void setIn(string S) { freopen(S.c_str(), "r", stdin); }
void setOut(string S) { freopen(S.c_str(), "w", stdout); }
void setIO(string S = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if ((int)(S).size()) {
    setIn(S + ".in"), setOut(S + ".out");
  }
}
template <class T>
struct Seg {
  const T ID = 0;
  T comb(T a, T b) { return max(a, b); }
  int N;
  vector<T> seg;
  void init(int _N) {
    N = _N;
    seg.assign(2 * N, ID);
  }
  void pull(int p) { seg[p] = comb(seg[2 * p], seg[2 * p + 1]); }
  void upd(int p, int val) {
    seg[p += N] = val;
    for (p /= 2; p; p /= 2) pull(p);
  }
  T query(int l, int r) {
    T ra = ID, rb = ID;
    for (l += N, r += N + 1; l < r; l /= 2, r /= 2) {
      if (l & 1) ra = comb(ra, seg[l++]);
      if (r & 1) rb = comb(seg[--r], rb);
    }
    return comb(ra, rb);
  }
};
int32_t main() {
  setIO();
  int t;
  cin >> t;
  while (t--) {
    long long a, b;
    cin >> a >> b;
    long long x = 0;
    for (int i = (0); i < (32); ++i) {
      if ((a & (1 << i)) && (b & (1 << i))) {
        x |= (1 << i);
      }
    }
    cout << (a ^ x) + (b ^ x) << "\n";
  }
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

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>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const int MX = 2e5 + 5;
const int MOD = 1e9 + 7;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
const int xd[4] = {1, 0, -1, 0}, yd[4] = {0, 1, 0, -1};
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
constexpr int pct(int x) { return __builtin_popcount(x); }
constexpr int bits(int x) { return 31 - __builtin_clz(x); }
template <class T>
T cdiv(T a, T b) {
  return a / b + !(a < 0 || a % b == 0);
}
int fstTrue(function<bool(int)> first, int lo, int hi) {
  hi++;
  assert(lo <= hi);
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    first(mid) ? hi = mid : lo = mid + 1;
  }
  return lo;
}
template <class T>
void remDup(vector<T>& v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << h;
  if (sizeof...(t)) cerr << ", ";
  DBG(t...);
}
void setIn(string S) { freopen(S.c_str(), "r", stdin); }
void setOut(string S) { freopen(S.c_str(), "w", stdout); }
void setIO(string S = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if ((int)(S).size()) {
    setIn(S + ".in"), setOut(S + ".out");
  }
}
template <class T>
struct Seg {
  const T ID = 0;
  T comb(T a, T b) { return max(a, b); }
  int N;
  vector<T> seg;
  void init(int _N) {
    N = _N;
    seg.assign(2 * N, ID);
  }
  void pull(int p) { seg[p] = comb(seg[2 * p], seg[2 * p + 1]); }
  void upd(int p, int val) {
    seg[p += N] = val;
    for (p /= 2; p; p /= 2) pull(p);
  }
  T query(int l, int r) {
    T ra = ID, rb = ID;
    for (l += N, r += N + 1; l < r; l /= 2, r /= 2) {
      if (l & 1) ra = comb(ra, seg[l++]);
      if (r & 1) rb = comb(seg[--r], rb);
    }
    return comb(ra, rb);
  }
};
int32_t main() {
  setIO();
  int t;
  cin >> t;
  while (t--) {
    long long a, b;
    cin >> a >> b;
    long long x = 0;
    for (int i = (0); i < (32); ++i) {
      if ((a & (1 << i)) && (b & (1 << i))) {
        x |= (1 << i);
      }
    }
    cout << (a ^ x) + (b ^ x) << "\n";
  }
}

```