#include <bits/stdc++.h>
using namespace std;
template <typename T>
static ostream& operator<<(ostream& stream, const vector<T>& t);
template <typename T>
static istream& read(T, T, istream& = cin);
template <typename T>
static istream& operator>>(istream& stream, vector<T>& t) {
  return read((t).begin(), (t).end(), stream);
}
template <typename T>
static istream& read(T b, T e, istream& stream) {
  for (T it = b; it != e; ++it) stream >> *it;
  return stream;
}
struct _print {
  string sep, end;
  bool space;
  ostream& stream;
  _print(string _sep = " ", string _end = "\n", ostream& _stream = cout)
      : sep(_sep), end(_end), space(false), stream(_stream) {}
  ~_print() { stream << end; }
  template <typename T>
  _print& operator,(const T& t) {
    if (space) stream << sep;
    space = true;
    stream << t;
    return *this;
  }
};
void _() {
  int n;
  cin >> n;
  vector<int> arr;
  vector<int> input(n);
  cin >> input;
  int cnt = 0, last = -1;
  for (int x : input) {
    if (x != last) {
      if (cnt) arr.push_back({cnt});
      last = x;
      cnt = 1;
    } else
      cnt++;
  }
  arr.push_back(cnt);
  int g = 0, s = 0, b = 0;
  for (int x : arr) {
    if (g == 0)
      g += x;
    else if (s <= g)
      s += x;
    else if (b <= g || (g + s + b + x) * 2 <= n)
      b += x;
  }
  if (g < s && g < b && (g + s + b) * 2 <= n)
    _print(), g, s, b;
  else
    _print(), 0, 0, 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(15);
  int t;
  cin >> t;
  for (int i = 1; i <= t; ++i) {
    _();
  }
}
