#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ld = long double;
const ld EPS = 1e-9;
const ll MOD = 998244353;
const ld PI = 3.141592653589793;
const int maxn = 4e5 + 1;
int p[maxn];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  int t;
  cin >> t;
  vector<int> cnts;
  vector<int> pref;
  while (t--) {
    int n;
    cin >> n;
    int last = -1;
    int uniq = 0;
    int cnt = 0;
    cnts.clear();
    for (int i = 1; i <= n; ++i) {
      cin >> p[i];
      if (p[i] != last) {
        cnts.push_back(cnt);
        ++uniq;
        last = p[i];
        cnt = 0;
      }
      ++cnt;
    }
    cnts.push_back(cnt);
    pref.assign(cnts.size(), 0);
    for (int i = 1; i < cnts.size(); ++i) {
      pref[i] = pref[i - 1] + cnts[i];
    }
    if (uniq < 3) {
      cout << "0 0 0\n";
      continue;
    }
    int g_it = 1;
    int s_it = 2;
    int b_it = 3;
    while (b_it + 1 < cnts.size() && 2 * pref[b_it + 1] <= n) {
      ++b_it;
    }
    while (s_it < b_it && pref[s_it] - pref[g_it] <= pref[g_it]) {
      ++s_it;
    }
    tuple<int, int, int> best{pref[g_it], pref[s_it] - pref[g_it],
                              pref[b_it] - pref[s_it]};
    if (pref[g_it] > 0 && pref[s_it] - pref[g_it] > 0 &&
        pref[b_it] - pref[s_it] > 0 && pref[s_it] - pref[g_it] > pref[g_it] &&
        pref[b_it] - pref[s_it] > pref[g_it]) {
      cout << get<0>(best) << " " << get<1>(best) << " " << get<2>(best)
           << "\n";
    } else {
      cout << "0 0 0\n";
    }
  }
}
