#include <bits/stdc++.h>
#define ll long long
#define fop(i,m,n) for(ll i=m;i<n;i++)
using namespace std;
int main(){
	ll t;
	cin >> t;
	while(t--){
		ll n;
		cin >> n;
		ll a[n+1] = {};
		fop(i,1,n+1) cin >> a[i];
		int f = 1;
		if(n < 6) f = 0;
		ll mid = n / 2;
		while(a[mid] == a[mid+1] ) mid--;
		ll count = 1;
		vector <ll> v;
		fop(i,2,mid+1){
			if(a[i] == a[i-1]){
				count++;
			}
			else{
				v.push_back(count);
				count = 1;
			}
		}
		if(count) v.push_back(count);
		count = 1ll * v.size();
		ll g, s, d;
		g = v[0];
		d = v[count-1];
		s = mid - g - d;
		count -= 2;//last sliver
		while( g > d ){
			d += v[count];
			s -= v[count];
			count--;
			if(count == 0) break;
		}
		if(g > s) f = 0;
		if(f) cout << g << " " << s << " " << d << " ";
		else cout << 0 << " " << 0 << " " << 0 ;
		cout << '\n';
	}
}