#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    long long a[n + 1];
    unordered_map<long long, long long> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      m[a[i]]++;
    }
    long long x[n + 1], k = 0;
    for (auto i = m.begin(); i != m.end(); i++) {
      x[k] = i->first;
      k++;
    }
    sort(x, x + k);
    if (n < 5)
      cout << "0 0 0\n";
    else {
      long long g = 0, s = 0, b = 0, r = n / 2, h = 0;
      g = m[x[k - 1]];
      r = r - g;
      long long flag = 0;
      if (r <= 0) flag = 1;
      for (int i = k - 2; i >= 0; i--) {
        if (s <= g) {
          s = s + m[x[i]];
          r = r - m[x[i]];
          if (r < 0) {
            flag = 1;
            break;
          }
        } else {
          b = b + m[x[i]];
          r = r - m[x[i]];
          if (r < 0) {
            if (b - m[x[i]] > g) {
              b = b - m[x[i]];
              break;
            } else {
              flag = 1;
              break;
            }
          }
        }
      }
      if (flag == 0) {
        cout << g << " " << s << " " << b << "\n";
      } else
        cout << "0 0 0\n";
    }
  }
}
