#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e6;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int qpow(long long x, long long n) {
  long long res = 0;
  while (n) {
    if (n & 1) res = res * x % MOD;
    x = x * x % MOD;
    n >>= 1;
  }
  return res;
}
int a[MAXN + 5];
void test_case() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  if (n <= 9) {
    printf("0 0 0\n");
    return;
  }
  sort(a + 1, a + 1 + n, greater<int>());
  int last = n / 2;
  if (a[last] == a[last + 1]) {
    while (last >= 1 && a[last - 1] == a[last]) {
      --last;
    }
    --last;
  }
  if (last <= 4) {
    printf("0 0 0\n");
    return;
  }
  int g = 0, s = 0, b = 0;
  int i;
  for (i = 1; i <= last; ++i) {
    if (a[i] == a[1]) {
      ++g;
    } else {
      break;
    }
  }
  if (i >= last) {
    printf("0 0 0\n");
    return;
  }
  int firsts = i;
  for (; i <= last; ++i) {
    if (a[i] == a[firsts]) {
      ++s;
    } else if (s <= g) {
      firsts = i;
      ++s;
    } else {
      break;
    }
  }
  if (i >= last) {
    printf("0 0 0\n");
    return;
  }
  b = last - i + 1;
  if (b <= g) {
    printf("0 0 0\n");
    return;
  }
  printf("%d %d %d\n", g, s, b);
}
int main() {
  int t = 1;
  scanf("%d", &t);
  for (int ti = 1; ti <= t; ++ti) {
    test_case();
  }
}
