#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, l = 0, p = 0, q = 0, r = 0, i, k;
    cin >> n;
    int a[n];
    map<int, int> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      m[a[i]]++;
    }
    if (n < 6)
      cout << p << " " << q << " " << r << endl;
    else {
      vector<int> v;
      for (auto i : m) {
        v.push_back(i.second);
      }
      k = v.size();
      p = v[k - 1];
      q = 0;
      r = 0;
      i = k - 2;
      while (q <= p && i >= 0) {
        q = q + v[i--];
      }
      while (r <= p && i >= 0) {
        r = r + v[i--];
      }
      while (i >= 0 && ((p + q + r + v[i]) <= n / 2)) {
        r = r + v[i--];
      }
      cout << p << " " << q << " " << r << endl;
    }
  }
}
