#include <bits/stdc++.h>
using namespace std;
long long powerLL(long long x, long long n) {
  long long result = 1;
  while (n) {
    if (n & 1) result = result * x;
    n = n / 2;
    x = x * x;
  }
  return result;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
void solve() {
  long long n;
  long long k;
  long long m;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> v, v1;
  if (n < 5) {
    cout << 0 << " " << 0 << " " << 0 << endl;
    return;
  } else {
    for (long long i = 0; i < n; i++) {
      if (i < n / 2) {
        v.push_back(a[i]);
        v1.push_back(a[i]);
      }
    }
    long long f = 0;
    {
      if (*v1.rbegin() == a[n / 2]) f = 1;
    }
    if (f == 1) {
      long long p = *v1.rbegin();
      while ((long long)v1.size() != 0 && *v1.rbegin() == p) {
        v1.erase(--v1.end());
      }
    }
    long long q = (long long)v1.size();
    if (q < 5) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      return;
    }
    sort(v1.begin(), v1.end());
    v1.erase(unique(v1.begin(), v1.end()), v1.end());
    if ((long long)v1.size() < 3) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      return;
    }
    reverse(v1.begin(), v1.end());
    vector<long long> v2;
    for (long long i = 0; i < (long long)v1.size(); i++) {
      v2.push_back(count(v.begin(), v.end(), v1[i]));
    }
    long long ans = v2[0];
    long long ans1 = v2[(long long)v2.size() - 1];
    if (ans < ans1 && ans < q - ans - ans1) {
      if (ans == 1 && ans1 == 5) {
        cout << 0 << " " << 0 << " " << 0 << endl;
        return;
      }
      cout << ans << " " << q - ans - ans1 << " " << ans1 << endl;
      return;
    }
    long long j = (long long)v2.size() - 2;
    for (long long i = j; i >= 2; i--) {
      ans1 += v2[i];
      if (ans == 1 && ans1 == 5) {
        cout << 0 << " " << 0 << " " << 0 << endl;
        return;
      }
      if (ans < ans1 && ans < q - ans - ans1) {
        cout << ans << " " << q - ans - ans1 << " " << ans1 << endl;
        return;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    solve();
  }
  return 0;
}
