#include <bits/stdc++.h>
using namespace std;
using LL = long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int nTest, n;
vector<int> p, l, r;
void Main() {
  cin >> n;
  p.assign(n, 0);
  for (int i = 0; i < n; ++i) cin >> p[i];
  l.assign(n, -1);
  for (int i = 0; i < n; ++i) {
    if (i && p[i] == p[i - 1])
      l[i] = l[i - 1];
    else
      l[i] = i;
  }
  r.assign(n, n);
  for (int i = n - 1; i >= 0; --i) {
    if (i + 1 < n && p[i] == p[i + 1])
      r[i] = r[i + 1];
    else
      r[i] = i;
  }
  array<int, 4> ans{0, 0, 0, 0};
  for (int g = 0; g < n; ++g)
    if (r[g] == g) {
      int s = g + g + 2;
      if (s >= n) continue;
      s = r[s];
      int b = n / 2;
      b = l[b] - 1;
      if (g < s && s < b && g + 1 < s - g && g + 1 < b - s)
        ans = max(ans, array<int, 4>{b + 1, g + 1, s - g, b - s});
    }
  for (int i = 1; i < 4; ++i) cout << ans[i] << ' ';
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> nTest;
  while (nTest--) Main();
  return 0;
}
