#include <bits/stdc++.h>
using namespace std;
int p[400010];
map<int, int> mp;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    mp.clear();
    for (int i = 1; i <= n; i++) {
      cin >> p[i];
      mp[p[i]]++;
    }
    if (n < 10 || mp.size() < 4) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      continue;
    }
    int maxP = n / 2;
    vector<pair<int, int> > vc;
    map<int, int>::iterator it;
    it = mp.begin();
    int lasttt = (*it).second;
    it++;
    for (; it != mp.end(); it++) {
      vc.push_back(make_pair((*it).first, (*it).second));
    }
    sort(vc.begin(), vc.end());
    int rem = n - lasttt;
    maxP = min(maxP, rem);
    int gans = 0, sans = 0, bans = 0;
    int ii = 0, jj = 0;
    int oo = 0;
    for (int i = vc.size() - 1; i >= 0; i--) {
      gans = vc[i].second;
      ii = i;
      break;
    }
    for (int i = ii - 1; i >= 0; i--) {
      sans += vc[i].second;
      if (sans > gans) {
        jj = i;
        break;
      }
    }
    for (int i = jj - 1; i >= 0; i--) {
      if (bans + vc[i].second + gans + sans <= maxP) {
        bans += vc[i].second;
      } else {
        break;
      }
    }
    if (gans > 0 && sans > 0 && bans > 0 && gans < sans && gans < bans &&
        gans + sans + bans <= maxP) {
      cout << gans << " " << sans << " " << bans << endl;
    } else {
      cout << 0 << " " << 0 << " " << 0 << endl;
    }
  }
}
