#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> vec(n);
  map<long long, long long, greater<long long>> mp;
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
    mp[vec[i]]++;
  }
  if (mp.size() < 3) {
    cout << "0 0 0";
    return;
  } else {
    vector<long long> s;
    long long sum = 0;
    for (auto x : mp) {
      s.push_back(x.second);
      sum += x.second;
    }
    long long s2 = 0;
    long long exp = sum / 2;
    long long ind = -1;
    for (int i = 0; i < s.size(); i++) {
      if (s2 + s[i] <= exp) {
        s2 += s[i];
        ind = i + 1;
      } else
        break;
    }
    if (ind < 3) {
      cout << "0 0 0";
    } else {
      long long a1 = s[0];
      long long indd = -1;
      long long a2 = 0, a3 = 0;
      for (long long i = 1; i < ind; i++) {
        if (a2 > a1) {
          indd = i;
          break;
        } else {
          a2 += s[i];
        }
      }
      if (indd == -1) {
        cout << "0 0 0";
        return;
      } else {
        for (long long i = indd; i < ind; i++) {
          a3 += s[i];
        }
        if (a3 <= a1) {
          cout << "0 0 0";
        } else {
          cout << a1 << " " << a2 << " " << a3;
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int test = 1;
  cin >> test;
  while (test--) {
    solve();
    cout << endl;
  }
}
