#include <bits/stdc++.h>
using namespace std;
long long calc(long long n) { return (((n - 1) * n) / 2); }
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    map<long long, long long> mp;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      mp[a[i]] += 1;
    }
    if (mp[1] % 2 == 1) {
      mp[1]--;
    }
    if (mp[1] >= (n / 2)) {
      cout << mp[1] << endl;
      for (long long i = 0; i < mp[1]; i++) {
        cout << 1 << " ";
      }
      cout << endl;
      continue;
    } else {
      cout << mp[0] << endl;
      for (long long i = 0; i < mp[0]; i++) {
        cout << 0 << " ";
      }
      cout << endl;
      continue;
    }
  }
}
