#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
template <class T>
void _sf(T &x) {
  cin >> x;
}
void _sf(int &x) { scanf("%d", &x); }
void _sf(long long &x) { scanf("%I64d", &x); }
void _sf(double &x) { scanf("%lf", &x); }
void _sf(char &x) { scanf(" %c", &x); }
void _sf(char *x) { scanf("%s", x); }
void sf() {}
template <class T, class... U>
void sf(T &head, U &...tail) {
  _sf(head);
  sf(tail...);
}
template <class T>
void _out(const T &x) {
  cout << x;
}
void _out(const int &x) { printf("%d", x); }
void _out(const long long &x) { printf("%I64d", x); }
void _out(const double &x) { printf("%.16f", x); }
void _out(const char &x) { putchar(x); }
void _out(const char *x) { printf("%s", x); }
template <class T, class U>
void _out(const pair<T, U> &x) {
  _out(x.F);
  putchar(' ');
  _out(x.S);
}
template <class T>
void _out(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _out(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void out() {}
template <class T, class... U>
void out(const T &head, const U &...tail) {
  _out(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  out(tail...);
}
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int maxn = 4e5 + 5;
int a[maxn];
map<int, int, greater<int> > mm;
int main() {
  int t = read();
  while (t--) {
    int n = read();
    mm.clear();
    a[0] = mod;
    for (int i = (1); i <= (n); ++i) {
      a[i] = read();
      mm[a[i]]++;
    }
    int h = n / 2;
    int val = 0;
    int ty = 0;
    for (auto ele : mm) {
      if (val + ele.second <= h) {
        ++ty;
        val += ele.second;
      } else
        break;
    }
    if (ty < 3)
      puts("0 0 0");
    else {
      int g = 0, s = 0, b = 0;
      int cnt = 0;
      auto git = mm.begin(), sit = mm.begin(), bit = mm.begin();
      for (auto it = mm.begin(); it != mm.end(); it++) {
        if (g + it->second < (val - (g + it->second) / 2)) {
          g += it->second;
          git = it;
        } else if (s <= g) {
          s += it->second;
          sit = it;
        } else if (b <= g) {
          b += it->second;
        }
        ++cnt;
        if (cnt >= ty) break;
      };
      ;
      ;
      auto pre = git;
      while (b <= g) {
        b += sit->second;
        s -= sit->second;
        sit--;
        if (sit == pre) break;
        while (s <= g) {
          s += git->second;
          g -= git->second;
          if (git == mm.begin()) break;
          git--;
        }
      }
      if (g == 0 || s == 0 || b == 0)
        puts("0 0 0");
      else
        printf("%d %d %d\n", g, s, b);
    }
  }
  return 0;
}
