#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin.tie(0), cout.tie(0);
  ;
  long long int t, n, i, j, a;
  cin >> t;
  while (t--) {
    vector<long long int> v, v1;
    long long int o = 0, e = 0, m, c = 0;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> a;
      if (a % 2 == 0) {
        o++;
      } else {
        e++;
      }
      v.push_back(a);
    }
    if (e <= (n / 2)) {
      cout << n - e << endl;
      for (i = 0; i < n; i++) {
        if (v[i] != 1) cout << v[i] << " ";
      }
      cout << endl;
    } else {
      if ((n - o) % 2 == 0) {
        cout << n - o << endl;
      } else {
        c++;
        cout << (n - o) - 1 << endl;
      }
      for (i = 0; i < n; i++) {
        if (v[i] == 1) {
          if (c > 0) {
            c--;
          } else {
            cout << v[i] << " ";
          }
        }
      }
      cout << endl;
    }
  }
  return 0;
}
