#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int num = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    num = (num << 3) + (num << 1) + (ch ^ 48);
    ch = getchar();
  }
  return num * f;
}
const int maxn(4e5 + 5);
int t, n;
int p[maxn], a[maxn], c[maxn], cnt;
int main() {
  t = read();
  while (t--) {
    n = read();
    for (int i = 1; i <= n; ++i) a[i] = p[i] = read();
    sort(p + 1, p + n + 1);
    int tmp = 1;
    p[0] = -1;
    for (int i = 1; i <= n; ++i) {
      if (p[i] != p[i - 1])
        c[cnt] = tmp, a[++cnt] = p[i], tmp = 1;
      else
        ++tmp;
    }
    c[cnt] = tmp;
    int g = 0, s = 0, b = 0, sum = 0;
    for (int i = cnt; i; --i) {
      sum += c[i];
      if (sum > (n >> 1)) break;
      if (g == 0)
        g = c[i];
      else if (s <= g)
        s += c[i];
      else
        b += c[i];
    }
    if (b <= g)
      printf("%d %d %d\n", 0, 0, 0);
    else
      printf("%d %d %d\n", g, s, b);
  }
}
