#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long g = 0, second = 0, b = 0;
    set<long long, greater<long long> > se;
    set<long long, greater<long long> >::iterator it;
    long long ara[1000001];
    memset(ara, 0, sizeof(ara));
    for (long long i = 0; i < n; i++) {
      long long num;
      cin >> num;
      se.insert(num);
      ara[num]++;
    }
    long long sum = 0, pos = 0;
    for (it = se.begin(); it != se.end(); it++) {
      long long x = *it;
      sum += ara[x];
      if (sum > n / 2) {
        sum -= ara[x];
        break;
      }
    }
    se.erase(it, se.end());
    vector<long long> vec;
    for (auto x : se) {
      vec.push_back(x);
    }
    for (long long i = 0; i < vec.size(); i++) {
      long long p = ara[vec[i]];
      sum -= p;
      if (p <= sum / 2) {
        long long res = 0;
        bool ok = true;
        for (long long j = i + 1; j < vec.size(); i++) {
          res += ara[vec[i]];
          if (res > sum - res && p >= res) break;
          if (res > p && sum - res > p) {
            g = p;
            second = res;
            b = sum - res;
            ok = false;
            break;
          }
        }
        if (ok == false) break;
      }
    }
    printf("%lld %lld %lld\n", g, second, b);
  }
}
