#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int a[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    map<int, int> ma;
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
      ma[a[i]]++;
    }
    int s1 = ma[a[1]], s2 = 0, s3 = 0;
    for (auto it = ma.begin(); it != ma.end(); it++) {
      if (ma.size() <= 3) break;
      if (it == ma.begin()) it++;
      if (s2 <= s1)
        s2 += it->second;
      else {
        if (s1 + s2 + s3 + it->second > n / 2) break;
        s3 += it->second;
      }
    }
    if (s1 < s2 && s1 < s3)
      printf("%d %d %d\n", s1, s2, s3);
    else
      cout << "0 0 0\n";
  }
  return 0;
}
