#include <bits/stdc++.h>
using namespace std;
int main() {
  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 i = 0;
    while (a[i] == a[0] && i < n) {
      i++;
    }
    if (i == n) {
      cout << "0 0 0" << endl;
      continue;
    }
    vector<int> a2;
    for (int j = i; j < n; j++) {
      a2.push_back(a[j]);
    }
    int G = i;
    int S = 0;
    while ((a2[S] == a2[0] || S <= G) && S < a2.size()) {
      S++;
    }
    if (S == a2.size()) {
      cout << "0 0 0" << endl;
      continue;
    }
    int B = 0;
    vector<int> a3;
    for (int j = S; j < a2.size(); j++) {
      a3.push_back(a2[j]);
    }
    while ((B <= S || B <= G) && B < a3.size()) {
      B++;
    }
    if (G < S && G < B && S < B && (G + S + B) <= (n / 2))
      cout << G << ' ' << S << ' ' << B << endl;
    else
      cout << "0 0 0" << endl;
  }
  return 0;
}
