#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int T, n, a[maxn], cnt[2];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> T;
  while (T--) {
    cin >> n;
    fill(cnt, cnt + 2, 0);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      ++cnt[a[i] % 2];
    }
    if (cnt[0] >= n / 2) {
      cout << n / 2 << endl;
      for (int i = 0; i < n / 2; i++) cout << 0 << " ";
    } else {
      while (cnt[1] & 1) --cnt[1];
      cout << cnt[1] << endl;
      for (int i = 0; i < cnt[1]; i++) cout << 1 << " ";
    }
    cout << endl;
  }
  return 0;
}
