#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 2e5 + 7;
void my_dbg() { cout << endl; }
template <typename Arg, typename... Args>
void my_dbg(Arg A, Args... B) {
  cout << ' ' << A;
  my_dbg(B...);
}
int main() {
  int tt;
  scanf("%d", &tt);
  while (tt--) {
    int n;
    scanf("%d", &n);
    map<int, int, greater<int> > m;
    for (long long i = 0; i < (int)n; i++) {
      int z;
      scanf("%d", &z);
      m[z]++;
    }
    vector<int> v;
    for (auto it : m) v.push_back(it.second);
    int g = v[0], s = 0, b = 0, i = 1;
    while (g >= s && i < v.size()) s += (v[i++]);
    int f = 0;
    if (g < s) {
      while (b <= g && i < v.size()) b += (v[i++]);
      while (b + g + s + v[i] <= (n / 2) && i < v.size()) b += v[i++];
      if (g < b && g + s + b <= n / 2) f = 1;
    }
    if (!f) g = 0, b = 0, s = 0;
    printf("%d ", (int)g), printf("%d ", (int)s), printf("%d\n", (int)b);
  }
}
