#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> arr(n);
  int one = 0, zero = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == 0) {
      zero++;
    } else {
      one++;
    }
  }
  vector<int> temp;
  if (one > zero) {
    for (int i = 0; i < n; i++) {
      if (arr[i] == 1) {
        temp.push_back(arr[i]);
      }
    }
  } else {
    for (int i = 0; i < n; i++) {
      if (arr[i] == 0) {
        temp.push_back(arr[i]);
      }
    }
  }
  if (accumulate(temp.begin(), temp.end(), 0) == 0) {
    cout << temp.size() << "\n";
    for (auto i : temp) {
      cout << i << " ";
    }
    cout << "\n";
    return;
  }
  if (temp.size() > 1 && temp.size() % 2 == 1) {
    cout << temp.size() - 1 << "\n";
    temp.pop_back();
    for (auto i : temp) {
      cout << i << " ";
    }
    cout << "\n";
    return;
  } else {
    cout << temp.size() << "\n";
    for (auto i : temp) {
      cout << i << " ";
    }
    cout << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
