#include <bits/stdc++.h>
using namespace std;
template <class A>
void read(vector<A>& v) {
  for (auto& x : v) cin >> x;
}
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cout << *x, 0);
template <class c>
char dud(...);
struct debug {
  ~debug() { cout << endl; }
  template <class c>
  typename enable_if<sizeof dud<c>(0) != 1, debug&>::type operator<<(c i) {
    cout << boolalpha << i;
    return *this;
  }
  template <class c>
  typename enable_if<sizeof dud<c>(0) == 1, debug&>::type operator<<(c i) {
    return *this << range(begin(i), end(i));
  }
  template <class c, class b>
  debug& operator<<(pair<b, c> d) {
    return *this << "(" << d.first << ", " << d.second << ")";
  }
  template <class c>
  debug& operator<<(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it) *this << ", " + 2 * (it == d.b) << *it;
    return *this << "]";
  }
};
const long MOD = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int o = 0, z = 0;
    for (int _ = 0; _ < n; _++) {
      int v;
      cin >> v;
      if (v == 1)
        o++;
      else
        z++;
    }
    int times, val;
    if (o > z) {
      times = o;
      val = 1;
    } else {
      times = z;
      val = 0;
    }
    if (val == 1 && times % 2 && val == 1) times--;
    cout << times << endl;
    for (int _ = 0; _ < times; _++) cout << val << ' ';
    cout << endl;
  }
}
