#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<map>
#include<list>
#include<cstdint>


using namespace std;
typedef long long ll;
typedef long double ld;

ll mod = 1'000'000'007;
int inf = 2'000'000'000;
vector<bool> was(1000000); 
vector<int> pos(1000000); 


ostream& operator<<(ostream& s, vector<int>& a) {
	for (auto x : a) {
		cout << x << " ";
	}
	return s;
}

ostream& operator<<(ostream& s, set<int>& a) {
	for (auto x : a) {
		cout << x << " ";
	}
	return s;
}

list<ll> TenToThree(ll n) {
	list<ll> res;
	while (n > 0) {
		res.push_front(n % 3);
		n /= 3;
	}
	return res;
}


ll ThreeToTen(list<ll> a) {
	ll i = 0;
	ll res = 0;
	list<ll>::iterator it = a.end();
	while (it != a.begin()) {
		it--;
		res += *it * pow(3, i);
		i++;
	}
	return res;
}




void solve() {
	int n;
	int g = 0, s = 0, b = 0;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}

	if (n < 5) {
		cout << "0 0 0" << endl; 
		return;
	}
	int i = 1; 
	while (i < n && a[i] == a[i - 1]) i++; 
	g = i;
	if (g > n - g) {
		cout << "0 0 0" << endl; 
		return;
	}
	while (s <= g) {
		i++;
		while (i < n && a[i] == a[i - 1]) i++;
		s = i - g;
		if (i > n - i) {
			cout << "0 0 0" << endl;
			return;
		}
	}
	while (b <= g) {
		++i; 
		while (i < n && a[i] == a[i - 1]) i++;
		if (i > n - i) {
			cout << "0 0 0" << endl;
			return; 
		}
		b = i - g - b;
	}
	i++;
	while (i < n - i) {
		int j = i + 1;
		while (j < n && a[j] == a[j - 1]) j++; 
		cout << j << endl; 
		if (j <= n - j)
			i = j;
		else
			break; 
	}
	b = i - g - s;


	cout << g << " " << s << " " << b << endl; 
}

int main() {
	int t;
	cin >> t;
	while (t--) solve();
	return 0;
}