#include <bits/stdc++.h>
using namespace std;
void show(long long int g, long long int s, long long int b) {
  cout << g << " " << s << " " << b << '\n';
}
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n + 1);
  map<long long int, long long int> f;
  for (long long int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (i <= n / 2) f[a[i]]++;
  }
  long long int tot = n / 2;
  if (a[n / 2] == a[n / 2 + 1]) tot -= f[a[tot]];
  long long int g = f[a[1]], s = 0, b = 0;
  long long int ag = g, as = s, ab = b;
  auto it = f.begin();
  it++;
  while (g + s + b <= n / 2 && it != f.end()) {
    s += it->second;
    b = tot - g - s;
    if ((g + s + b <= n / 2 && g + s + b > ag + as + ab) && g < s && g < b) {
      ag = g;
      as = s;
      ab = b;
    }
    it++;
  }
  if (ag == 0 || as == 0 || ab == 0) {
    show(0, 0, 0);
    return;
  }
  show(ag, as, ab);
}
int32_t main() {
  long long int tst;
  cin >> tst;
  while (tst--) solve();
}
