#include <bits/stdc++.h>
using namespace std;
namespace zyt {
const int N = 4e5 + 10;
int p[N], tmp[N], n, num[N];
int work() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n;
    memset(num, 0, sizeof(num));
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", p + i), tmp[i] = p[i];
    sort(tmp + 1, tmp + n + 1);
    int cnt = unique(tmp + 1, tmp + n + 1) - tmp - 1;
    for (int i = 1; i <= n; i++)
      ++num[tmp + cnt + 1 - lower_bound(tmp + 1, tmp + cnt + 1, p[i])];
    for (int i = 1; i <= cnt; i++) num[i] += num[i - 1];
    int ans[3] = {0, 0, 0};
    for (int i = 1; i <= cnt; i++) {
      int p1 = upper_bound(num + 1, num + cnt + 1, num[i] * 2) - num;
      int p2 = upper_bound(num + 1, num + cnt + 1, n / 2) - num - 1;
      if (p1 < p2 && num[p2] - num[p1] > num[i] &&
          num[p2] > ans[0] + ans[1] + ans[2])
        ans[0] = num[i], ans[1] = num[p1] - num[i], ans[2] = num[p2] - num[p1];
    }
    if (ans[0] && ans[1] && ans[2])
      printf("%d %d %d\n", ans[0], ans[1], ans[2]);
    else
      puts("0 0 0");
  }
  return 0;
}
}  // namespace zyt
int main() { return zyt::work(); }
