#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
using ll = long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> P;
    for (int i = 0; i < n; i++) {
      int p;
      cin >> p;
      P.push_back(p);
    }
    reverse((P).begin(), (P).end());
    vector<int> golds;
    while (!P.empty() && (golds.empty() || golds.back() == P.back())) {
      golds.push_back(P.back());
      P.pop_back();
    }
    vector<int> silvers;
    while (!P.empty() && (int((silvers).size()) <= int((golds).size()) ||
                          silvers.back() == P.back())) {
      silvers.push_back(P.back());
      P.pop_back();
    }
    vector<int> bronzes;
    while (!P.empty() && (int((bronzes).size()) <= int((golds).size()) ||
                          bronzes.back() == P.back())) {
      bronzes.push_back(P.back());
      P.pop_back();
    }
    if (int((golds).size()) == 0 || int((silvers).size()) == 0 ||
        int((bronzes).size()) == 0 ||
        int((golds).size()) + int((silvers).size()) + int((bronzes).size()) >
            int((P).size())) {
      cout << "0 0 0\n";
      continue;
    }
    vector<int> ans = {int((golds).size()), int((silvers).size()),
                       int((bronzes).size())};
    while (!P.empty()) {
      bronzes.push_back(P.back());
      P.pop_back();
      while (!P.empty() && P.back() == bronzes.back()) {
        bronzes.push_back(P.back());
        P.pop_back();
      }
      if (int((golds).size()) + int((silvers).size()) + int((bronzes).size()) <=
          int((P).size()))
        ans = {int((golds).size()), int((silvers).size()),
               int((bronzes).size())};
      else
        break;
    }
    for (auto a : ans) cout << a << " ";
    cout << "\n";
  }
}
