#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n + 3];
  for (int i = (1); i < (n + 1); i++) {
    cin >> a[i];
  }
  if (n >= 6) {
    int j = n / 2;
    while (a[j] == a[j - 1] && a[j] == a[j + 1]) j--;
    if (a[j] == a[j + 1]) j--;
    int g = 0, s = 0, b = 0;
    map<int, int> m;
    queue<int> s1;
    for (int i = 1; i <= j; i++) {
      if (m[a[i]] == 0) s1.push(a[i]);
      m[a[i]]++;
    }
    int c = 0;
    int t1 = 0, t2 = 0, t3 = 0;
    if (s1.size() >= 3) {
      while (!s1.empty()) {
        auto it = s1.front();
        c++;
        if (c == 1)
          t1 = m[it];
        else if (c >= 2) {
          if (t2 <= t1) {
            t2 += m[it];
          } else if (t2 > t1 && t3 <= t1) {
            t3 += m[it];
          } else
            t3 += m[it];
        }
        s1.pop();
      }
      if (t1 < t2 && t1 < t3) {
        cout << t1 << " " << t2 << " " << t3 << '\n';
      } else
        cout << 0 << " " << 0 << " " << 0 << '\n';
    } else {
      cout << 0 << " " << 0 << " " << 0 << '\n';
    }
  } else
    cout << 0 << " " << 0 << " " << 0 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
