#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long, long long> A, pair<long long, long long> B) {
  return A.first < B.first;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    map<long long, long long> mp;
    for (long long insert = 0; insert < n; insert++) {
      long long p;
      cin >> p;
      mp[p]++;
    }
    vector<pair<long long, long long> > v;
    for (auto it : mp) {
      v.push_back({it.first, it.second});
    }
    sort(v.begin(), v.end(), comp);
    if (v.size() < 3) {
      cout << "0 0 0\n";
      continue;
    }
    long long f1 = v[v.size() - 1].second;
    v.pop_back();
    long long f2 = 0;
    while (!v.empty() && f2 <= f1) {
      f2 += v.back().second;
      v.pop_back();
    }
    long long rem = (n / 2) - f1 - f2;
    long long f3 = 0;
    while (!v.empty()) {
      if ((f3 + v.back().second) <= rem)
        f3 += v.back().second;
      else {
        break;
      }
      v.pop_back();
    }
    if (f1 >= f2 || f1 >= f3) {
      cout << "0 0 0\n";
    } else {
      cout << f1 << ' ' << f2 << " " << f3 << '\n';
    }
  }
}
