#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long INF = 1e17;
const long long p_pow = 257;
const int MAXX = 1e9;
const int modo = 1e9 + 7;
int t;
int n;
int a[maxn];
int last[maxn];
int main() {
  cin >> t;
  while (t--) {
    int g, s, b;
    g = s = b = 0;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      last[a[i]] = i;
    }
    int l = 1;
    while (last[a[l]] != l && l < n / 2) l++;
    g += l;
    l++;
    int r = n / 2;
    while (last[a[r]] != r && r > 0) r--;
    while (b <= g) {
      b++;
      r--;
    }
    while (last[a[r]] != r && r > 0) {
      b++;
      r--;
    }
    if (r - l + 1 > g) {
      s = r - l + 1;
    } else {
      g = s = b = 0;
    }
    printf("%d %d %d\n", g, s, b);
  }
  return 0;
}
