#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long double PI = 2 * acos(0.0);
const vector<long long int> dx = {1, -1, 0, 0};
const vector<long long int> dy = {0, 0, 1, -1};
template <typename T = long long int>
vector<T> ga(long long int n, bool oneIndexed = false) {
  vector<T> a = vector<T>(n + oneIndexed);
  for (long long int i = 0; i < n; i++) {
    T p;
    cin >> p;
    a[i + oneIndexed] = p;
  }
  return move(a);
}
template <typename T, typename A>
void pa(vector<T, A> const &a, long long int begin = 0,
        long long int end = -1) {
  if (end == -1) end = (long long int)a.size() - 1;
  for (long long int i = begin; i <= end; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
}
template <typename T, typename A>
void papair(vector<T, A> const &a, long long int begin = 0,
            long long int end = -1) {
  if (end == -1) end = (long long int)a.size() - 1;
  for (long long int i = begin; i <= end; i++) {
    cout << a[i].first << " " << a[i].second << "\n";
  }
}
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> p = ga(n);
  vector<long long int> ca;
  map<long long int, long long int> mp;
  for (long long int i = 0; i < n; i++) {
    mp[-p[i]]++;
  }
  if (mp.size() < 3) {
    cout << "0 0 0\n";
    return;
  }
  long long int g = 0, s = 0, b = 0, cc = 0;
  vector<long long int> arr;
  long long int sss = 0;
  for (auto a : mp) {
    cc += a.second;
    if (cc > n / 2) {
      break;
    }
    if (g == 0) {
      g = a.second;
    } else {
      sss += a.second;
      arr.push_back(a.second);
    }
  }
  if (arr.size() < 2) {
    cout << "0 0 0\n";
    return;
  }
  long long int cccc = 0;
  for (long long int i = 0; i < arr.size() - 1; i++) {
    cccc += arr[i];
    if (cccc > g && (sss - cccc) > g) {
      cout << g << " " << cccc << " " << sss - cccc << '\n';
      return;
    }
  }
  cout << "0 0 0\n";
  return;
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
