#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    map<long long, long long> cnt;
    cin >> n;
    long long arr[n + 1];
    long long g = 0, s = 0, b = 0, jk, temp;
    vector<long long> v;
    for (long long i = 0; i < n; i++) {
      cin >> arr[i];
      cnt[arr[i]]++;
    }
    arr[n] = -1;
    for (long long i = cnt[arr[0]]; i < n; i++) {
      if (arr[i] != arr[i + 1]) v.push_back(arr[i]);
    }
    temp = n / 2;
    g = cnt[arr[0]];
    temp -= g;
    if (v.size() < 3) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      continue;
    }
    if (g + cnt[v[0]] + cnt[v[1]] > n / 2) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      continue;
    }
    if (v.size() != 0) {
      for (long long i = 0; i < v.size(); i++) {
        if (cnt[v[i]] <= temp) {
          s += cnt[v[i]];
          temp -= cnt[v[i]];
        }
        if (s > g) {
          jk = i;
          break;
        }
      }
    }
    if (v.size() != 0) {
      for (long long i = jk + 1; i < v.size(); i++) {
        if (cnt[v[i]] <= temp) {
          b += cnt[v[i]];
          temp -= cnt[v[i]];
        } else
          break;
      }
    }
    if (g <= 0 || s <= 0 || b <= 0 || b <= g || s <= g)
      cout << 0 << " " << 0 << " " << 0 << endl;
    else
      cout << g << " " << s << " " << b << endl;
  }
}
