#include <bits/stdc++.h>
#pragma optimize("O3")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void dout() { cerr << "\n"; }
template <typename Head, typename... Tail>
void dout(Head H, Tail... T) {
  cerr << H << ' ';
  dout(T...);
}
mt19937 rnd(time(0));
int main() {
  int t;
  cin >> t;
  int n, a;
  for (int z = (0); z < (t); z++) {
    map<int, int> map;
    cin >> n;
    set<int> s;
    vector<int> v;
    for (int i = (0); i < (n); i++) {
      cin >> a;
      if (s.find(a) == s.end()) {
        v.push_back(a);
        s.insert(a);
      }
      map[a]++;
    }
    if (v.size() < 3) {
      cout << "0 0 0"
           << "\n";
      continue;
    }
    int gold = map[v[0]], silver = 0, bronze = 0;
    int pointer = 1, sum1 = map[v[0]];
    while (gold >= silver) {
      silver += map[v[pointer]];
      sum1 += map[v[pointer]];
      if (pointer == v.size()) {
        break;
      }
      pointer++;
    }
    while (sum1 <= n / 2) {
      bronze += map[v[pointer]];
      sum1 += map[v[pointer]];
      pointer++;
    }
    pointer--;
    bronze -= map[v[pointer]];
    if (gold < silver && gold < bronze) {
      cout << gold << " " << silver << " " << bronze << "\n";
    } else {
      cout << "0 0 0"
           << "\n";
    }
  }
  cerr << "Time elapsed: " << clock() / (double)CLOCKS_PER_SEC << "\n";
  return 0;
}
