#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int N = 4e5 + 5, M = 1e6 + 5;
int t;
int n, a[N], g, s, b;
int cnt[M];
pair<int, int> dat[N];
bool vis[M];
int dcnt;
int main(int argc, char const *argv[]) {
  int t;
  scanf("%d", &t);
  for (int kk = 0; kk < t; ++kk) {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
      scanf("%d", &a[i]);
      ++cnt[a[i]];
    }
    dcnt = 0;
    for (int i = 1; i <= n; ++i) {
      if (!vis[a[i]]) {
        vis[a[i]] = 1;
        dat[dcnt++] = make_pair(a[i], cnt[a[i]]);
      }
    }
    sort(dat, dat + dcnt);
    reverse(dat, dat + dcnt);
    int rsum = 0, ed = -1;
    for (int i = dcnt - 1; i >= 3; --i) {
      rsum += dat[i].second;
      if (rsum * 2 >= n) {
        ed = i;
        break;
      }
    }
    if (ed == -1) {
      puts("0 0 0");
      continue;
    } else {
      g = dat[0].second;
      int ed2 = -1, lsum = 0;
      for (int i = 1; i <= ed - 1; ++i) {
        lsum += dat[i].second;
        if (lsum > g) {
          s = lsum;
          break;
        }
      }
      b = n - rsum - g - s;
      if (b > g) {
        printf("%d %d %d\n", g, s, b);
      } else
        puts("0 0 0");
    }
    for (int i = 1; i <= n; ++i) {
      --cnt[a[i]];
      vis[a[i]] = 0;
    }
  }
  return 0;
}
