#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 10;
int a[maxn], sum[maxn];
int main() {
  int t, n, su, x, tot, g, s, b;
  cin >> t;
  while (t--) {
    map<int, int> mp;
    vector<int> e;
    cin >> n;
    su = n / 2;
    for (int i = 1; i <= n; i++) {
      cin >> x;
      if (mp[x] == 0) e.push_back(x);
      mp[x]++;
      sum[i] = 0;
    }
    for (int i = 0; i < e.size(); i++) {
      sum[i + 1] = sum[i] + mp[e[i]];
    }
    g = 1, s = 2, b = 3;
    int l = e.size();
    if (e.size() < 5 || n < 12 || sum[3] > su) {
      puts("0 0 0");
      continue;
    }
    for (int i = 4; i <= l; i++) {
      if (sum[i] > n / 2) break;
      b = i;
      if ((sum[s + 1] - sum[g]) <= (sum[b] - sum[s + 1])) s++;
      if (sum[g + 1] < (sum[s] - sum[g + 1])) g++;
    }
    int x1 = sum[g];
    int x2 = sum[s] - sum[g];
    int x3 = sum[b] - sum[s];
    if (x1 < x2 && x2 <= x3 && (sum[b] <= su))
      cout << x1 << " " << x2 << " " << x3 << endl;
    else
      puts("0 0 0");
  }
  return 0;
}
