#include <bits/stdc++.h>
using namespace std;
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
template <class T>
T gcd(T A, T B) {
  return (A % B == 0) ? B : gcd(B, A % B);
}
const int MOD = 1e9 + 7;
const int MX = 2e5 + 5;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
void setIn(string s) { freopen(s.c_str(), "r", stdin); }
void setOut(string s) { freopen(s.c_str(), "w", stdout); }
bool sort_rev(int a, int b) { return a > b; }
bool sort_(pair<string, int> &p1, pair<string, int> &p2) {
  if (p1.first == p2.first) return p1.second < p2.second;
  return p1.first < p2.first;
}
int ara[400005];
int main() {
  int t = 1;
  scanf("%d", &t);
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> ara[i];
    vector<int> unq;
    map<int, int> mp;
    int tot = 0;
    for (int i = 0; i < n / 2; i++) {
      if (ara[i] <= ara[n - 1]) break;
      if (!mp[ara[i]]) unq.push_back(ara[i]);
      mp[ara[i]]++;
      tot++;
    }
    int l = (int)unq.size();
    int g = 0, s = 0, b = 0;
    for (int i = 0; i < l; i++) {
      if (((g + mp[unq[i]]) + 1) * 2 < tot - (g + mp[unq[i]]))
        g += mp[unq[i]];
      else {
        if (!s)
          s += mp[unq[i]];
        else
          b += mp[unq[i]];
      }
    }
    if (!g || !b || !s)
      cout << 0 << " " << 0 << " " << 0 << "\n";
    else
      cout << g << " " << s << " " << b << "\n";
  }
  return 0;
}
