#include <bits/stdc++.h>
using namespace std;
void runTest() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  if (n <= 5) {
    cout << "0 0 0"
         << "\n";
    return;
  }
  long long int mid = (n / 2) - 1;
  map<long long int, long long int> m;
  set<long long int> se;
  for (long long int i = mid; i >= 0; i--) {
    if (a[i] != a[i + 1]) se.insert(a[i]);
    if (se.find(a[i]) != se.end()) m[a[i]]++;
  }
  if (se.size() < 3) {
    cout << "0 0 0"
         << "\n";
    return;
  }
  vector<long long int> v;
  long long int sum = 0;
  for (auto it : m) {
    v.push_back(it.second);
    sum += it.second;
  }
  reverse(v.begin(), v.end());
  long long int g = 0, s = 0, b = v.back();
  sum -= v.back();
  v.pop_back();
  long long int pre = 0;
  for (auto it : v) {
    pre += it;
    long long int gtemp = min(pre, sum - pre - 1);
    long long int stemp = sum - pre;
    if (gtemp + stemp > g + s) {
      g = gtemp;
      s = stemp;
    }
  }
  if (g == 0 || s == 0 || b == 0) {
    cout << "0 0 0"
         << "\n";
    return;
  }
  for (long long int i = v.size() - 1; i >= 0; i--) {
    if (g >= b) {
      if (g < s - v[i]) {
        s -= v[i];
        b += v[i];
      } else {
        cout << "0 0 0"
             << "\n";
        return;
      }
    } else {
      break;
    }
  }
  cout << g << ' ' << s << ' ' << b << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) runTest();
  return 0;
}
