#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int minn(long long int a, long long int b) {
  if (a < b) return a;
  return b;
}
int arr[400005], pos[1000006];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, g, s, b, i, x;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> x;
      arr[i + 1] = x;
      pos[x] = i + 1;
    }
    s = 0;
    b = 0;
    bool cant = 0;
    if (n < 5) cant = 1;
    for (i = n / 2; i > 0; i--) {
      if (arr[i] != arr[i + 1]) break;
    }
    int lim = i;
    if (lim == 0)
      cant = 1;
    else {
      g = pos[arr[1]];
      if (3 * g + 2 > lim)
        cant = 1;
      else {
        s = pos[arr[g + g + 1]] - g;
        if (lim - (g + s) <= g)
          cant = 1;
        else
          b = lim - (g + s);
      }
    }
    if (!cant && 2 * (g + s + b) <= n)
      cout << g << ' ' << s << ' ' << b << endl;
    else
      cout << "0 0 0\n";
  }
}
