#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    set<int> s;
    map<int, int> b;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      b[a[i]]++;
      s.insert(a[i]);
    }
    int h = n / 2;
    if (h < 3 || s.size() < 3) {
      cout << 0 << " " << 0 << " " << 0;
    } else {
      vector<int> v;
      int r = 0;
      for (int i = 0; i < n; i++) {
        v.push_back(b[a[i]]);
        int u = i + b[a[i]] - 1;
        i = u;
      }
      int l = v[0];
      int i = 1;
      int s = 0;
      int p = 0;
      int q = 0;
      while (i <= v.size() - 2) {
        s += v[i];
        if (s > l) {
          int j = i + 1;
          int b = 0;
          while (j <= v.size() - 1) {
            b += v[j];
            j++;
            if (b > l && ((l + s + b) <= h)) {
              p = l;
              q = s;
              r = b;
            }
          }
          break;
        }
        i++;
      }
      cout << p << " " << q << " " << r;
    }
    cout << endl;
  }
}
