#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<int> A(n);
    for (int i = 0; i < n; ++i) cin >> A[i];
    {
      int m = 0;
      for (int i = 0, j = 0; i < n; i = j) {
        while (j < n and A[i] == A[j]) ++j;
        A[m++] = j - i;
      }
      A.resize(m);
      n = m;
    }
    vector<int> psum(n + 1);
    for (int i = 1; i <= n; ++i) psum[i] = psum[i - 1] + A[i - 1];
    int num = 0;
    tuple<int, int, int> ans;
    for (int i = 1, j = 1, k = 1; i < n; ++i) {
      while (j < n and psum[i] >= psum[j] - psum[i]) ++j;
      while (k < n and psum[i] >= psum[k] - psum[j]) ++k;
      while (k < n and psum[k + 1] <= psum[n] / 2) ++k;
      int g = psum[i], s = psum[j] - psum[i], b = psum[k] - psum[j];
      if (g > 0 and s > 0 and b > 0 and g < s and g < b and
          g + s + b <= psum[n] / 2) {
        int newNum = g + s + b;
        if (newNum >= num) {
          ans = {g, s, b};
          num = newNum;
        }
      }
    }
    int g, s, b;
    tie(g, s, b) = ans;
    cout << g << ' ' << s << ' ' << b << '\n';
  }
}
