Problem: Let's call an array a_1, a_2, ..., a_m of nonnegative integer numbers good if a_1 + a_2 + ... + a_m = 2⋅(a_1 ⊕ a_2 ⊕ ... ⊕ a_m), where ⊕ denotes the [bitwise XOR operation](https://en.wikipedia.org/wiki/Bitwise_operation#XOR).

For example, array [1, 2, 3, 6] is good, as 1 + 2 + 3 + 6 = 12 = 2⋅ 6 = 2⋅ (1⊕ 2 ⊕ 3 ⊕ 6). At the same time, array [1, 2, 1, 3] isn't good, as 1 + 2 + 1 + 3 = 7 ≠ 2⋅ 1 = 2⋅(1⊕ 2 ⊕ 1 ⊕ 3).

You are given an array of length n: a_1, a_2, ..., a_n. Append at most 3 elements to it to make it good. Appended elements don't have to be different. It can be shown that the solution always exists under the given constraints. If there are different solutions, you are allowed to output any of them. Note that you don't have to minimize the number of added elements!. So, if an array is good already you are allowed to not append elements.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10 000). The description of the test cases follows.

The first line of each test case contains a single integer n (1≤ n ≤ 10^5) — the size of the array.

The second line of each test case contains n integers a_1, a_2, ..., a_n (0≤ a_i ≤ 10^9) — the elements of the array.

It is guaranteed that the sum of n over all test cases does not exceed 10^5.

Output

For each test case, output two lines.

In the first line, output a single integer s (0≤ s≤ 3) — the number of elements you want to append.

In the second line, output s integers b_1, ..., b_s (0≤ b_i ≤ 10^{18}) — the elements you want to append to the array.

If there are different solutions, you are allowed to output any of them.

Example

Input


3
4
1 2 3 6
1
8
2
1 1


Output


0

2
4 4
3
2 6 2

Note

In the first test case of the example, the sum of all numbers is 12, and their ⊕ is 6, so the condition is already satisfied.

In the second test case of the example, after adding 4, 4, the array becomes [8, 4, 4]. The sum of numbers in it is 16, ⊕ of numbers in it is 8.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("-O2")
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\t";
  err(++it, args...);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& c, pair<T1, T2>& v) {
  c << "(" << v.first << "," << v.second << ")";
  return c;
}
template <template <class...> class TT, class... T>
ostream& operator<<(ostream& out, TT<T...>& c) {
  out << "{ ";
  for (auto& x : c) out << x << " ";
  out << "}";
  return out;
}
const int LIM = 1e5 + 5, MOD = 1e9 + 7;
int t, n, m, k, x, y, w;
int dp[65][5][4];
int nxt[65][5][4];
long long xo = 0, sm = 0;
bool solve(int i, int c, int d) {
  if (dp[i][c][d] != -1) return dp[i][c][d];
  int cur = ((sm & (1ll << i)) > 0) ? 1 : 0;
  cur += c;
  int cur2 = ((i > 0) ? (((xo & (1ll << (i - 1))) > 0) ? 1 : 0) : 0);
  bool ok = 0;
  for (int j = 0; j < 4; ++j) {
    int nc = (cur + j) / 2;
    int cur4 = ((cur + j) & 1) ? 1 : 0;
    int cur3 = ((cur2 + d) & 1) ? 1 : 0;
    if (cur4 == cur3 && solve(i + 1, nc, j)) {
      nxt[i][c][d] = j;
      ok = 1;
      break;
    }
  }
  return dp[i][c][d] = ok;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    cin >> n;
    sm = 0, xo = 0;
    for (int i = 0; i < n; ++i) {
      cin >> x;
      sm += x;
      xo = xo ^ x;
    }
    for (int i = 0; i < 60; ++i)
      for (int j = 0; j < 5; ++j)
        for (int k = 0; k < 4; ++k) dp[i][j][k] = -1;
    for (int j = 0; j < 5; ++j)
      for (int k = 0; k < 4; ++k) dp[60][j][k] = 0;
    dp[60][0][0] = 1;
    bool ys = solve(0, 0, 0);
    long long a[3] = {0};
    int c = 0, d = 0;
    for (int i = 0; i < 60; ++i) {
      int cur = nxt[i][c][d];
      for (int j = 0; j < cur; ++j) {
        a[j] += (1ll << i);
      }
      d = cur;
      c += cur;
      c += (((sm & (1ll << i)) > 0) ? 1 : 0);
      c /= 2;
    }
    cout << 3 << "\n" << a[0] << " " << a[1] << " " << a[2] << "\n";
  }
  return 0;
}