#include <bits/stdc++.h>
long double pi = acos(-1.0);
const int mod = 1e9 + 7;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(20);
  cout.setf(ios::fixed);
  int t;
  cin >> t;
  for (int(ha) = 0; (ha) < t; (ha)++) {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int(i) = 0; (i) < n; (i)++) {
      cin >> v[i];
    }
    sort((v).rbegin(), (v).rend());
    vector<int> ch;
    int x = 1;
    for (int(i) = 1; (i) < n; (i)++) {
      if (v[i] != v[i - 1]) {
        ch.push_back(x);
        x = 1;
      } else
        x++;
    }
    ch.push_back(x);
    int l = 1, r = n / 2;
    int ga = 0, sa = 0, ba = 0;
    int mx = -1;
    while (l < r) {
      int m = (l + r + 1) >> 1;
      int g = 0, s = 0, b = 0;
      int gr = 0;
      for (int(i) = 0; (i) < ch.size(); (i)++) {
        if (g + ch[i] <= m)
          g += ch[i];
        else {
          gr = i;
          break;
        }
      }
      for (int(i) = gr; (i) < ch.size(); (i)++) {
        if (s < g + 1)
          s += ch[i];
        else {
          gr = i;
          break;
        }
      }
      for (int(i) = gr; (i) < ch.size(); (i)++) {
        if (g + s + b + ch[i] <= n / 2)
          b += ch[i];
        else {
          break;
        }
      }
      if (b > g && s > g && g > 0) {
        l = m;
        if (g + s + b > mx) {
          mx = g + s + b;
          ga = g;
          sa = s;
          ba = b;
        }
      } else
        r = m - 1;
    }
    if (sa > ga && ba > ga && ga + sa + ba <= n)
      cout << ga << " " << sa << " " << ba << endl;
    else
      cout << 0 << " " << 0 << " " << 0 << endl;
  }
  return 0;
}
