#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, i, a, sum = 0;
    set<int> mset;
    map<int, int> mmap;
    priority_queue<int> Q, Q1;
    cin >> n;
    for (i = 0; i < n; i++) {
      cin >> a;
      if (mmap[a] == 0) {
        Q.push(a);
      }
      mmap[a]++;
    }
    while (!Q.empty()) {
      int fo = Q.top();
      if (sum + mmap[fo] <= (n / 2)) {
        sum += mmap[fo];
        Q1.push(fo);
        mset.insert(fo);
      } else {
        break;
      }
      Q.pop();
    }
    if (mset.size() < 3) {
      cout << "0 0 0" << endl;
    } else {
      int fo = Q1.top();
      int gold = mmap[fo];
      int silver = 0, bronze = 0;
      Q1.pop();
      while (!Q1.empty()) {
        fo = Q1.top();
        if (gold >= silver) {
          silver += mmap[fo];
        } else {
          bronze += mmap[fo];
        }
        Q1.pop();
      }
      if (gold > 0 && silver > 0 && bronze > 0 && gold < silver &&
          gold < bronze) {
        printf("%d %d %d\n", gold, silver, bronze);
      } else {
        cout << "0 0 0" << endl;
      }
    }
  }
}
