#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 4e5 + 10;
const int INF = 0x3f3f3f3f;
int n, a[maxn];
int cnt[1000000 + 10];
void solve() {
  vector<int> p;
  for (int i = 0; i < n; ++i) {
    if (!cnt[a[i]]) {
      p.push_back(a[i]);
    }
    cnt[a[i]]++;
  }
  int num = 0, sum = 0;
  for (int i = 0; i < (int)p.size(); ++i) {
    if (sum + cnt[p[i]] <= n / 2) {
      sum += cnt[p[i]];
      num++;
    } else
      break;
  }
  if (num <= 2)
    cout << 0 << " " << 0 << " " << 0 << endl;
  else {
    num--;
    int sum_s = 0, sum_g = cnt[p[0]];
    for (int i = 1; i < (int)p.size(); ++i) {
      if (num && sum_s <= sum_g) {
        sum_s += cnt[p[i]];
        num--;
      }
    }
    int sum_b = sum - sum_s - sum_g;
    if (sum_b <= sum_g || sum_s <= sum_g)
      cout << 0 << " " << 0 << " " << 0 << endl;
    else
      cout << sum_g << " " << sum_s << " " << sum_b << endl;
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; ++i) cin >> a[i];
    solve();
    for (int i = 0; i < n; ++i) cnt[a[i]] = 0;
  }
  return 0;
}
