#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, x, Max, gold = 0, silver = 0, bronze = 0;
  cin >> n;
  map<int, int> Map;
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (Map[x] == 0) {
      v.push_back(x);
    }
    Map[x]++;
  }
  Max = n / 2;
  int length = v.size();
  if (v.size() < 3)
    cout << "0 0 0" << endl;
  else {
    gold += Map[v[0]];
    if (gold >= Max) {
      cout << "0 0 0" << endl;
      return;
    }
    Max -= gold;
    int idx = 1;
    while (idx < length) {
      silver += Map[v[idx]];
      if (Max - Map[v[idx]] <= 0) {
        cout << "0 0 0" << endl;
        return;
      }
      Max -= Map[v[idx]];
      idx++;
      if (gold < silver) break;
    }
    while (idx < length) {
      bronze += Map[v[idx]];
      if (Max - Map[v[idx]] < 0 && bronze < gold) {
        cout << "0 0 0" << endl;
        return;
      }
      Max -= Map[v[idx]];
      idx++;
      if (gold < bronze) break;
    }
    while (idx < length) {
      if (Max - Map[v[idx]] < 0) break;
      bronze += Map[v[idx]];
      Max -= Map[v[idx]];
      idx++;
    }
    if (gold < silver && gold < bronze && (gold + silver + bronze <= Max))
      cout << gold << " " << silver << " " << bronze << endl;
    else
      cout << "0 0 0" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
}
