#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 200;
const int M = 1e6 + 200;
template <class Ruby_Rose>
inline void read(Ruby_Rose &x) {
  x = 0;
  char ch = getchar(), w = 0;
  while (!isdigit(ch)) w = (ch == '-'), ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  x = w ? -x : x;
}
int T, n, val[N], tmp[N];
bool cmp(int a, int b) { return a > b; }
int main() {
  read(T);
  while (T--) {
    read(n);
    for (register int i = 1; i <= n; i++) read(val[i]);
    sort(val + 1, val + 1 + n, cmp);
    int num = 0;
    for (register int i = 1, cnt = 0; i <= n; i++) {
      ++cnt;
      if (val[i] != val[i + 1] || i == n) {
        tmp[++num] = cnt;
        cnt = 0;
      }
    }
    if (num < 4 || tmp[1] + tmp[2] + tmp[3] > n / 2) {
      printf("0 0 0\n");
      continue;
    }
    int cnm = tmp[1], num2 = 0, num3 = 0;
    for (register int i = 2; i <= num; i++) {
      if (cnm + tmp[i] <= n / 2 && num2 <= tmp[1])
        num2 += tmp[i], cnm += tmp[i];
      else if (cnm + tmp[i] <= n / 2 && num2 > tmp[1])
        num3 += tmp[i], cnm += tmp[i];
      else
        break;
    }
    if (tmp[1] > num2 || tmp[1] > num3) {
      printf("0 0 0\n");
      continue;
    }
    cout << tmp[1] << " " << num2 << " " << num3 << endl;
  }
  return 0;
}
