#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 5;
int n, x, a[MAX];
void solve() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int lim = n / 2;
  for (int i = lim - 1; i >= 0; i--)
    if (a[i] != a[i + 1]) {
      n = i + 1;
      break;
    }
  set<int> s;
  for (int i = 0; i < n; i++) s.insert(a[i]);
  int cur = n / 3;
  if (s.size() <= 3) {
    cout << 0 << " " << 0 << " " << 0 << "\n";
    return;
  }
  cout << cur - 1 << " " << cur + 1 << " " << cur + (n % 3) << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
