#include <bits/stdc++.h>
using namespace std;
long long int divi[129];
map<long double, long long int> mp1;
map<long long int, long long int> mp2;
vector<int> stp[29];
string str1;
string str2;
long long int arra[100007];
deque<long long int> save;
long long int ans1[100005];
long long int ans2[100005];
long long int inp1[400009];
long long int inp2[200009];
long long int pos_b[200009];
vector<long long int> BRC;
map<long long int, long long int> vis;
pair<long long int, long long int> sol;
map<pair<long long int, long long int>, long long int> mp3;
int main() {
  long long int a, b, c, d, e, f, g, h, i, j, k, l = 0, n, t, m, s;
  cin >> t;
  while (t--) {
    cin >> n;
    g = 0;
    b = 0;
    s = 0;
    for (i = 1; i <= n; i++) {
      cin >> inp1[i];
      mp2[inp1[i]]++;
    }
    for (i = 1; i <= n; i++) {
      if (vis[inp1[i]] == 0) {
        vis[inp1[i]] = 1;
        BRC.push_back(mp2[inp1[i]]);
      }
    }
    m = BRC.size();
    g = 0;
    s = 0;
    b = 0;
    for (i = 0; i < m; i++) {
      if (g == 0) {
        g = g + BRC[i];
      } else if (s <= g) {
        s = s + BRC[i];
      } else if (g + b + s + BRC[i] <= n / 2) {
        b = b + BRC[i];
      } else
        break;
    }
    if (s > g && b > g && g > 0 && s > 0 && b > 0 && g + s + b <= n / 2) {
      cout << g << " " << s << " " << b << '\n';
    } else
      cout << "0 0 0" << '\n';
    mp2.clear();
    vis.clear();
    BRC.clear();
  }
}
