#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9;
int n, p[N], pre[N], suc[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) scanf("%d", p + i);
    sort(p + 1, p + 1 + n);
    reverse(p + 1, p + 1 + n);
    for (int i = 1; i <= n; ++i) {
      pre[i] = pre[i - 1];
      if (i == n || p[i] != p[i + 1]) {
        pre[i] = i;
      }
    }
    for (int i = n; i >= 1; --i) {
      suc[i] = suc[i + 1];
      if (i == n || p[i] != p[i + 1]) {
        suc[i] = i;
      }
    }
    int ans = 0, g = 0, s = 0, b = 0;
    for (int i = 1; i + i + i + 2 <= n; ++i) {
      if (p[i] != p[i + 1]) {
        int pos1 = suc[i + i + 1];
        int pos2 = pre[n / 2];
        if (pos2 - pos1 > i) {
          if (pos2 > ans) {
            ans = pos2;
            g = i;
            s = pos1 - i;
            b = pos2 - pos1;
          }
        }
      }
    }
    printf("%d %d %d\n", g, s, b);
  }
}
