#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323;
long long mod = 1000000000 + 7;
long long modu = 998244353;
const double pii = acos(-1.0);
long long power(long long x, long long y) {
  long long res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long powe(long long x, long long y) {
  x = x % mod, y = y % (mod - 1);
  long long ans = 1;
  while (y > 0) {
    if (y & 1) {
      ans = (1ll * x * ans) % mod;
    }
    y >>= 1;
    x = (1ll * x * x) % mod;
  }
  return ans;
}
void fun() {}
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long ncr(long long n, long long r) {
  long long res = 1;
  if (r > n) return 0;
  if (r > n - r) r = n - r;
  for (long long i = 0; i < r; i++) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
const long long N = 1e6 + 7;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  fun();
  long long ttt = 1;
  cin >> ttt;
  while (ttt--) {
    long long n;
    cin >> n;
    map<long long, long long> m;
    std::vector<long long> v;
    for (long long i = 0; i < n; i++) {
      long long x;
      cin >> x;
      v.push_back(x);
      m[x]++;
    }
    if (n < 3) {
      cout << "0 0 0\n";
      continue;
    }
    sort(v.rbegin(), v.rend());
    long long x = n / 2;
    if (v[n / 2 - 1] == v[n / 2]) {
      for (long long i = n / 2; i >= 0; i--) {
        if (v[i] == v[i - 1])
          x--;
        else
          break;
      }
    }
    auto it = unique(v.begin(), v.end());
    v.resize(distance(v.begin(), it));
    long long g = 0, s = 0, b = 0;
    for (long long i : v) {
      if (x > m[i]) {
        g = m[i];
        x -= g;
        auto it = v.begin();
        v.erase(it);
        break;
      }
    }
    if (v.size() == 0) {
      cout << "0 0 0\n";
      continue;
    }
    long long f = 0;
    for (long long i : v) {
      auto it = v.begin();
      if (x >= m[*it]) {
        s += m[*it];
        x -= m[*it];
        auto itr = v.begin();
        v.erase(itr);
      } else {
        f = 1;
        break;
      }
      if (s > g) break;
    }
    if (v.size() == 0) {
      cout << "0 0 0\n";
      continue;
    }
    for (long long i : v) {
      auto it = v.begin();
      if (x >= m[*it]) {
        b += m[*it];
        x -= m[*it];
        auto itr = v.begin();
        v.erase(itr);
      } else {
        f = 1;
        break;
      }
      if (b > g) break;
    }
    long long e = 0;
    for (long long i : v) {
      auto it = v.begin();
      if (x >= m[*it]) {
        e += m[*it];
        x -= m[*it];
        auto itr = v.begin();
        v.erase(itr);
      } else {
        f = 1;
        break;
      }
    }
    if (g == 0 or s == 0 or b == 0) {
      cout << "0 0 0\n";
      continue;
    }
    cout << g << ' ' << s << ' ' << b + e << "\n";
  }
  return 0;
}
