#include <bits/stdc++.h>
using namespace std;
const int N = 1000100;
int n, a[N];
int main() {
  int _;
  cin >> _;
  while (_--) {
    cin >> n;
    int x;
    for (int i = (1); i <= (n); ++i) cin >> x, ++a[x];
    if (a[0] >= a[1]) {
      cout << a[0] << "\n";
      for (int i = (1); i <= (a[0]); ++i) cout << 0 << " ";
      cout << "\n";
    } else {
      if (a[1] % 2 == 1) --a[1];
      cout << a[1] << "\n";
      for (int i = (1); i <= (a[1]); ++i) cout << 1 << " ";
      cout << "\n";
    }
    a[0] = a[1] = 0;
  }
  return 0;
}
