#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define p(x,y) pair<x,y>
#define oset(x) tree<x, null_type, less<x>, rb_tree_tag, tree_order_statistics_node_update>
#define all(x) (x).begin(),(x).end()
#define ll long long
#define scan(a) for(auto &it:a)cin>>it;
#define print(a) {for(auto it:a)cout<<it<<" ";cout<<endl;}
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
//#define int ll

void solve()
{
  int n,sum=0;
  cin>>n;
  map<int,int> mp;
  rep(i,0,n)
  {
    int t;
    cin>>t;
    mp[t]++;
  }
  if(mp.size()<3)
  {
    cout<<"0 0 0\n";
    return;
  }
  int g=mp.rbegin()->second,s=0,b=0;
  sum=g;
  auto it=mp.rbegin();
  it++;
  while(it!=mp.rend()&&s<=g)
  {
    s+=it->second;
    it++;
  }
  sum+=s;
  if(it==mp.rend()||2*sum>n)
  {
    cout<<"0 0 0\n";
    return;
  }
   while(it!=mp.rend()&&2*sum+it->second<n)
  {
    b+=it->second;
    sum+=it->second;
    it++;
  }
  // cout<<sum<<" ";
  if(2*sum>n||b<=g)
  {
    cout<<"0 0 0\n";
    return;
  }
  cout<<g<<" "<<s<<" "<<b<<endl;
}
int32_t main()
{
  ios_base::sync_with_stdio(false);cin.tie(NULL);
  int t=1;
  cin>>t;
  while(t--)
  {
    solve();
  }
  return 0;
}
