#include <bits/stdc++.h>
using namespace std;
const long long NN = 1e10 + 7;
const int N = 1e5 + 7;
const int M = 11;
const long long mod = 1e9 + 7;
const long long inf = 1e18 + 7;
const double long rf = 1e-14;
void solve1() {
  int n;
  cin >> n;
  int ar[n];
  set<int> st;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    if (i < n / 2) st.insert(ar[i]);
    if (st.count(ar[i]) && i >= n / 2) st.erase(ar[i]);
  }
  if (st.size() < 3) {
    cout << 0 << " " << 0 << " " << 0 << endl;
    return;
  }
  int a = 0, b = 0, c = 0;
  for (int i = 0; i < n; i++)
    if (ar[i] == ar[0]) a++;
  for (int i = 0; i < n; i++)
    if (ar[i] == ar[a]) b++;
  for (int i = a + b; i < n / 2; i++)
    if (st.count(ar[i])) c++;
  cout << a << " " << b << " " << c << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  int cghf = 1;
  cin >> cghf;
  while (cghf--) {
    solve1();
  }
}
