#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
bool isPrime(long long n) {
  if (n == 1) return false;
  for (long long i = 2; i < sqrt(n) + 1; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
long long seive(long long n) {
  vector<bool> marked(n + 1, false);
  marked[1] = true;
  for (long long i = 2; i <= sqrt(n); i++) {
    for (long long j = i * i; j <= n; j += i) marked[j] = true;
  }
  long long count = 0;
  for (long long i = 2; i <= n; i++)
    if (!marked[i]) count++;
  return count;
}
long long totient(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
void subString(string s, long long n, vector<pair<string, long long>>& a) {
  for (long long i = 0; i < s.size(); i++)
    for (long long len = 1; len <= s.size() - i; len++) {
      string l = s.substr(i, len);
      a.push_back(make_pair(l, l.size()));
    }
}
void substring(string s, string k) {
  if (s.size() == 0) {
    cout << k << " ";
    return;
  }
  string op1 = k;
  string op2 = k;
  op2.push_back(s[0]);
  s.erase(s.begin() + 0);
  substring(s, op1);
  substring(s, op2);
  return;
}
long long sod(long long num) {
  long long count = 0;
  while (num > 0) {
    num /= 10;
    count++;
  }
  return count;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1, el = 1;
  cin >> t;
  while (t--) {
    long long a, b;
    cin >> a >> b;
    cout << (a ^ b) << "\n";
  }
  return 0;
}

### Prompt

In CPP, your task is to solve 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 gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
bool isPrime(long long n) {
  if (n == 1) return false;
  for (long long i = 2; i < sqrt(n) + 1; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
long long seive(long long n) {
  vector<bool> marked(n + 1, false);
  marked[1] = true;
  for (long long i = 2; i <= sqrt(n); i++) {
    for (long long j = i * i; j <= n; j += i) marked[j] = true;
  }
  long long count = 0;
  for (long long i = 2; i <= n; i++)
    if (!marked[i]) count++;
  return count;
}
long long totient(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
void subString(string s, long long n, vector<pair<string, long long>>& a) {
  for (long long i = 0; i < s.size(); i++)
    for (long long len = 1; len <= s.size() - i; len++) {
      string l = s.substr(i, len);
      a.push_back(make_pair(l, l.size()));
    }
}
void substring(string s, string k) {
  if (s.size() == 0) {
    cout << k << " ";
    return;
  }
  string op1 = k;
  string op2 = k;
  op2.push_back(s[0]);
  s.erase(s.begin() + 0);
  substring(s, op1);
  substring(s, op2);
  return;
}
long long sod(long long num) {
  long long count = 0;
  while (num > 0) {
    num /= 10;
    count++;
  }
  return count;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1, el = 1;
  cin >> t;
  while (t--) {
    long long a, b;
    cin >> a >> b;
    cout << (a ^ b) << "\n";
  }
  return 0;
}

```