#include <bits/stdc++.h>
using namespace std;
long long t, n, f, p[1000007], g, s, b, m, k, mxb, ls;
int main() {
  cin >> t;
  for (int i = 1; i <= t; i++) {
    cin >> n;
    g = 0;
    s = 0;
    b = 0;
    f = 0;
    for (int j = 1; j <= n; j++) cin >> p[j];
    mxb = 0;
    k = n;
    ls = 0;
    while (k > n / 2) {
      mxb = max(mxb, p[k]);
      k--;
    }
    for (int j = 1; j <= n / 2; j++) {
      if (p[j] > mxb) m = j;
    }
    if (m < 5 || n < 10)
      f = 1;
    else {
      for (int j = 1; j <= m; j++) {
        if (p[j] == p[1])
          g++;
        else {
          if (s <= g) {
            s++;
            ls = p[j];
          } else {
            if (p[j] == ls) s++;
          }
        }
      }
      b = m - g - s;
      if (g >= s || g >= b || s == 0 || b == 0) {
        f = 1;
      }
    }
    if (f == 0)
      cout << g << " " << s << " " << b << endl;
    else
      cout << "0 0 0" << endl;
  }
  return 0;
}
