#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 9e18;
const int inf = 2147483647;
long long phi(long long n) {
  long long ans = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      ans = ans / i * (i - 1);
      while (n % i == 0) n /= i;
    }
  }
  if (n > 1) ans = ans / n * (n - 1);
  return ans;
}
long long qpow(long long a, long long b, long long mod) {
  long long r = 1;
  for (; b; b >>= 1) {
    if (b & 1) r = (r * a) % mod;
    a = (a * a) % mod;
  }
  return r;
}
long long C(int n, int m) {
  if (m < n - m) m = n - m;
  long long ans = 1;
  for (int i = m + 1; i <= n; i++) ans *= i;
  for (int i = 1; i <= n - m; i++) ans /= i;
  return ans;
}
const int N = 4e5 + 5;
int a[N];
unordered_map<int, int> x;
void work() {
  int t;
  scanf("%d", &t);
  for (int k = 1; k <= t; k++) {
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      x[a[i]] = i;
    }
    int g = 1, s = 0, b = 0, pos1 = 0;
    while (g < n && a[g] == a[0]) g++;
    for (int len = g + 1;; len++) {
      if (g + len - 1 >= n || pos1 >= n) break;
      int t = g + len - 1;
      int val = a[t];
      int pos = x[val];
      int ts = pos - g + 1, tb;
      if (g + ts + g + 1 > n / 2 || pos + g >= n) break;
      if (len == g + 1) {
        t = pos + g;
        val = a[t];
        pos1 = x[val];
        tb = pos1 - pos;
      }
      int mx = -1;
      while (1) {
        pos1++;
        if (pos1 >= n) break;
        val = a[pos1];
        pos1 = x[val];
        tb = pos1 - pos;
        if (g + ts + tb > n / 2) break;
        mx = tb;
      }
      len = ts;
      if (mx > 0 && g + ts + mx <= n / 2 && ts + mx > s + b) {
        s = ts;
        b = mx;
      }
    }
    if (g >= s || g >= b || g + b + s > n / 2)
      printf("%d %d %d\n", 0, 0, 0);
    else
      printf("%d %d %d\n", g, s, b);
  }
}
int main() {
  work();
  return 0;
}
