#include <bits/stdc++.h>
const int MXN = 4e5 + 200;
const long long MNN = 4e2 + 200;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const int OO = 1e9 + 500;
using namespace std;
int p[MXN];
long long G, second, B;
int ans = 0;
long long pr[MXN];
void solve() {
  int n;
  cin >> n;
  ans = -1;
  G = second = B = 0;
  vector<int> v;
  int cnt = 1;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    if (i == 1) continue;
    if (p[i] == p[i - 1]) {
      cnt++;
    } else {
      v.push_back(cnt);
      cnt = 1;
    }
  }
  v.push_back(cnt);
  for (int i = 1; i < v.size(); i++) {
    pr[i] = pr[i - 1] + v[i];
  }
  long long g = v[0];
  long long s = 0;
  for (int i = 1; i < v.size(); i++) {
    s += v[i];
    if (g + s > n - g - s) break;
    int l = i + 1, r = v.size() - 1;
    while (r - l > 1) {
      int m = (l + r) / 2;
      if (pr[m] - pr[i] + g + s <= n - (pr[m] - pr[i]) - g - s) {
        l = m;
      } else {
        r = m - 1;
      }
    }
    if (pr[r] - pr[i] + g + s <= n - (pr[r] - pr[i]) - g - s && g < s &&
        g < pr[r] - pr[i]) {
      if (pr[r] - pr[i] + g + s > ans) {
        ans = pr[r] - pr[i] + g + s;
        G = g, second = s, B = pr[r] - pr[i];
      }
    }
    if (pr[l] - pr[i] + g + s <= n - (pr[l] - pr[i]) - g - s && g < s &&
        g < pr[l] - pr[i]) {
      if (pr[l] - pr[i] + g + s > ans) {
        ans = pr[l] - pr[i] + g + s;
        G = g, second = s, B = pr[l] - pr[i];
      }
    }
  }
  cout << G << ' ' << second << ' ' << B << '\n';
}
int main() {
  ios_base::sync_with_stdio(0), cout.tie(0), cin.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
