#include <bits/stdc++.h>
using namespace std;
int T, n, a[1000005], cnt[1000005], cc;
int main() {
  scanf("%d", &T);
  while (T--) {
    int g = 0, s = 0, b = 0, cc = 0, st = 1;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
      scanf("%d", &a[i]), cnt[a[i]]++, cc += (cnt[a[i]] == 1);
    if (cc < 3) {
      for (int i = 1; i <= n; i++) cnt[a[i]] = 0;
      puts("0 0 0");
      continue;
    }
    g = cnt[a[1]], st += g;
    while (s <= g && st < n) s += cnt[a[st]], st += cnt[a[st]];
    for (int i = st; i <= n; i += cnt[a[i]]) {
      if (g + s + b + cnt[a[i]] > n / 2) break;
      b += cnt[a[i]];
    }
    for (int i = 1; i <= n; i++) cnt[a[i]] = 0;
    if (b > g && s > g)
      printf("%d %d %d\n", g, s, b);
    else
      puts("0 0 0");
  }
  return 0;
}
