#include <bits/stdc++.h>
using namespace std;
void input(long long ara[], long long n) {
  for (long long i = 0; i < n; i++) cin >> ara[i];
}
void output(long long ara[], long long n) {
  for (long long i = 0; i < n; i++) cout << ara[i] << " ";
}
long long mx1(long long ara[], long long n) {
  long long mx = -1;
  for (long long i = 0; i < n; i++)
    if (ara[i] > mx) mx = ara[i];
  return mx;
}
long long mn1(long long ara[], long long n) {
  long long mn = 1e18;
  for (long long i = 0; i < n; i++)
    if (ara[i] < mn) mn = ara[i];
  return mn;
}
int main() {
  (ios_base::sync_with_stdio(false), cin.tie(NULL));
  long long t;
  cin >> t;
  long long l = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long ara[n + 2];
    map<long long, long long> m;
    set<long long, greater<long long> > s;
    for (long long i = 0; i < n; i++) {
      long long a;
      cin >> a;
      m[a]++;
      s.insert(a);
    }
    if (s.size() > 2 && n > 4) {
      long long k = n / 2;
      long long f1 = 0, f2 = 0, f3 = 0, f33 = 0;
      long long a = *s.begin();
      f1 = m[a];
      s.erase(s.begin());
      while (f1 >= f2 && s.size()) {
        a = *s.begin();
        f2 += m[a];
        s.erase(s.begin());
      }
      while (f1 > f3 && s.size()) {
        a = *s.begin();
        f3 += m[a];
        s.erase(s.begin());
      }
      f33 = f3;
      if (f1 + f2 + f3 > k)
        cout << "0 0 0" << endl;
      else {
        while (f1 + f2 + f3 <= k) {
          f33 = f3;
          a = *s.begin();
          f3 += m[a];
          s.erase(s.begin());
        }
        if (f33 == 1 || f2 == 1)
          cout << "0 0 0" << endl;
        else
          cout << f1 << " " << f2 << " " << f33 << endl;
      }
    } else
      cout << 0 << " " << 0 << " " << 0 << endl;
  }
}
