#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    long long a, c, d, e, f, i, j, k, m, n, o, x, y;
    long long g = 0, s = 0, b = 0;
    cin >> n;
    long long ar[n + 5];
    vector<long long> v;
    map<long long, long long> mp;
    for (i = 1; i <= n; i++) {
      cin >> ar[i];
      if (mp[ar[i]] == 0) v.push_back(ar[i]);
      mp[ar[i]]++;
    }
    if (v.size() < 3 || (mp[v[0]] + mp[v[1]] + mp[v[2]]) * 2 > n) {
      cout << g << " " << s << " " << b << "\n";
      continue;
    }
    g = mp[v[0]];
    long long sum = g + b + s;
    for (i = 1; i < v.size(); i++) {
      if ((2 * sum + mp[v[i]]) > n) break;
      if (s <= g) {
        s += mp[v[i]];
        sum += mp[v[i]];
        continue;
      }
      sum += mp[v[i]];
      b += mp[v[i]];
    }
    if (g == 0 || s == 0 || b == 0) {
      cout << "0 0 0\n";
      continue;
    }
    cout << g << " " << s << " " << b << "\n";
  }
}
