#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> m(n);
    map<long long, long long> ma;
    set<long long> s;
    for (long long i = 0; i < n; i++) {
      cin >> m[i];
      ma[m[i]]++;
      s.insert(m[i]);
    }
    if (n / 2 < 3) {
      cout << "0 0 0" << '\n';
    } else {
      vector<long long> ans(3);
      long long sum = 0;
      long long ss = s.size();
      for (long long i = 0; i < ss; i++) {
        if (!ans[0] && sum + ma[*s.rbegin()] <= n / 2) {
          ans[0] += ma[*s.rbegin()];
        } else if (ans[1] <= ans[0] && sum + ma[*s.rbegin()] <= n / 2) {
          ans[1] += ma[*s.rbegin()];
        } else if (sum + ma[*s.rbegin()] <= n / 2) {
          ans[2] += ma[*s.rbegin()];
        } else
          break;
        sum += ma[*s.rbegin()];
        s.erase(*s.rbegin());
      }
      if (!ans[0] || !ans[1] || !ans[2] || ans[0] > ans[1] || ans[1] > ans[2]) {
        cout << "0 0 0" << '\n';
      } else {
        cout << ans[0] << ' ' << ans[1] << ' ' << ans[2] << '\n';
      }
    }
  }
  return 0;
}
