#include <bits/stdc++.h>
using namespace std;
int main() {
  (ios_base::sync_with_stdio(false), cin.tie(NULL));
  ;
  int t, n, x;
  cin >> t;
  while (t--) {
    int one = 0, Z = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> x;
      if (x == 1)
        one++;
      else
        Z++;
    }
    if (one <= n / 2)
      one = 0;
    else if (Z < n / 2) {
      Z = 0;
      if (one & 1) one--;
    }
    if (Z > 0) cout << Z << "\n";
    if (one > 0) cout << one << "\n";
    for (int i = 1; i <= Z; i++) cout << "0 ";
    for (int i = 1; i <= one; i++) cout << "1 ";
    cout << "\n";
  }
  return 0;
}
