#include <bits/stdc++.h>
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long INF = 1e18 + 123;
const long double EPS = 1e-9;
const int inf = 1e9 + 123;
const int MOD = 1e9 + 7;
const int N = 503;
const int M = 1e6 + 123;
const double pi = 3.14159265359;
const int dx[] = {0, 0, 1, -1};
const int dy[] = {1, -1, 0, 0};
long long ans, m, n, res, g, s, c, b, pos;
void solve() {
  cin >> n;
  vector<long long> v(n);
  vector<long long> f;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  long long x = v[n / 2 - 1];
  if (n / 2 <= 2) {
    cout << "0 0 0" << endl;
    return;
  }
  if (x == v[n / 2]) {
    for (long long i = x; i > 0; i--) {
      if (v[i] != x) {
        pos = i;
        break;
      }
    }
  } else
    pos = 3;
  if (pos + 1 >= 3) {
    for (long long i = 0; i < n / 2; i++) {
      if (v[i] == v[i + 1]) {
        c++;
      } else {
        f.push_back(c + 1);
        c = 0;
      }
    }
    for (long long i = 0; i < (f.size() / 2) / 2; i++) {
      g += f[i];
    }
    for (long long i = (f.size() / 2) / 2; i < f.size() / 2; i++) {
      s += f[i];
    }
    for (long long i = f.size() / 2; i < f.size(); i++) {
      b += f[i];
    }
    cout << g << ' ' << s << ' ' << b << endl;
  } else
    cout << "0 0 0" << endl;
  g = 0;
  s = 0;
  b = 0;
  pos = 0;
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
