#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long power(long long x, long long y) {
  long long res = 1ll;
  x %= MOD;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % MOD;
    y = y >> 1ll;
    x = (x * x) % MOD;
  }
  return res;
}
long long inv(long long x) {
  long long r = 1ll, t = x, k = MOD - 2ll;
  while (k) {
    if (k & 1ll) r = (long long)r * t % MOD;
    t = (long long)t * t % MOD;
    k >>= 1;
  }
  return r;
}
const int nax = 2e5 + 13;
void prep() {}
bool isPrime(long long x) {
  if (x == 1) return false;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
void solve() {}
void read() {
  int n, ile[2] = {0, 0};
  cin >> n;
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    ile[x]++;
  }
  if (ile[1] % 2) ile[1]--;
  if (ile[0] >= n / 2) {
    cout << ile[0] << endl;
    for (int i = 0; i < ile[0]; i++) cout << 0 << ' ';
    cout << endl;
  } else if (ile[1] >= n / 2) {
    cout << ile[1] << endl;
    for (int i = 0; i < ile[1]; i++) cout << 1 << ' ';
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  int T = 1;
  prep();
  cin >> T;
  for (int i = 1; i <= T; i++) {
    read();
    solve();
  }
  return 0;
}
