#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 1e6 + 10;
int sum[N];
int a[N], n, vis[N];
bool cmp(int x, int y) { return x > y; }
int main() {
  int _;
  cin >> _;
  while (_--) {
    scanf("%d", &n);
    for (int i = 1; i <= (n); ++i) {
      scanf("%d", &a[i]);
      vis[a[i]]++;
    }
    sort(a + 1, a + 1 + n);
    int tot = unique(a + 1, a + 1 + n) - a - 1;
    sort(a + 1, a + 1 + tot, cmp);
    int d = n / 2;
    int pre = 0, id = 0;
    for (int i = 1; i <= tot; ++i) {
      if (pre + vis[a[i]] <= d)
        pre += vis[a[i]], id = i;
      else
        break;
    }
    if (id < 3) {
      puts("0 0 0");
      continue;
    }
    int ans1, ans2, ans3;
    ans1 = vis[a[1]];
    ans2 = ans3 = 0;
    int i1 = 2;
    while (i1 < id && ans2 + vis[a[i1]] <= ans1) ans2 += vis[a[i1++]];
    ans2 += vis[a[i1++]];
    while (i1 <= id) ans3 += vis[a[i1++]];
    if (ans1 < ans2 && ans1 < ans3)
      printf("%d %d %d\n", ans1, ans2, ans3);
    else
      puts("0 0 0");
    for (int i = 1; i <= tot; ++i) vis[a[i]] = 0;
  }
}
