#include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#include "debug.cpp"
#endif
#define ll long long int
#define MOD 1000000007
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
#define INF 100000000000000 //INF - 1e14
#define vi vector<ll>
#define pb push_back
#define mpl map<ll,ll>
#define ff first
#define ss second
#define pll pair<ll,ll>
#define vpll vector<pair<ll,ll> >
#define fer(i, a, n) for( ll i = a; i <= n; i++)
#define fdr(i, a, n) for( ll i = a; i >= n; i--)
#define invec(n,v) vi v(n); fer(i,0,n-1) cin >> v[i]
#define insvec(n,v) rin(n); vi v(n); fer(i,0,n-1) cin >> v[i]
#define MK2DV(v,row,col,val) vector<vector<ll> > v(row, vector<ll>(col,val))
#define matrix vector<vector<ll> >
#define printv(v,i,j) for(ll it =i; it <= j; it++) cout << v[it] << ' '; cout << '\n';
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
template <typename T> inline void inp(T &any) {cin >> any;} template <typename T, typename... U>inline void inp(T &a, U &...b) {cin >> a; inp(b...);}
#define rin(args...) ll args; inp(args);
#ifndef ONLINE_JUDGE
#define debug(x...) cout << "[" << #x << "] = ["; _print(x)
#define matdeb(mat,row,col) cout << #mat << "::" << endl; printmat(mat,row,col); printpartition;
#define debugv(v,n) cout << #v << ":" << endl; printv(v,0,n-1); printpartition;
#else
#define debug(x...)
#define matdeb(mat,row,col)
#define debugv(v,n)
#endif
ll fast_pow(ll base, ll exp, ll M = MOD) { base = base % M; ll result = 1; while (exp > 0) { if (exp % 2 == 1) result = (result * base) % M; base = (base * base) % M; exp = exp / 2; } return result; }
ll modInverse(ll A, ll M = MOD) { return fast_pow(A, M - 2, M); } // only when M is prime
ll lcm(ll x, ll y) { return x / gcd(x, y) * y;}
void coordinatecompress(vector<ll> &data) { ll n = data.size(); vector<pair<ll, ll> > tempdata(n); fer(i, 0, n - 1) tempdata[i] = {data[i], i}; sort(tempdata.begin(), tempdata.end()); data[tempdata[0].second] = 0; fer(i, 1, n - 1) data[tempdata[i].second] = data[tempdata[i - 1].second] + (tempdata[i - 1].first != tempdata[i].first); }
string yes = "Yes", no = "No";
// void dfs(ll s, ll p) {
// 	for (auto nbr : adj[s]) {
// 		if (nbr != p) {
// 			dfs(nbr, s);
// 		}
// 	}
// }
int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ll test_cases = 1;
	cin >> test_cases;
	for (ll test_case = 1; test_case <= test_cases; test_case++) {
#ifndef ONLINE_JUDGE
		cout << "Case #" << test_case << ": " << endl;
#endif
		int n;
		cin >> n;
		vector<int > v(n);
		for (int i = 0; i < n; i++)
			cin >> v[i];
		sort(v.begin(), v.end(), greater<int>());
		int nxt = v[n / 2];
		debug(nxt);
		v.resize(n / 2);
		debug(v);
		n /= 2;
		debug(n);
		int rmv = 0;
		debug(n);
		// debug(v[1]);
		for (int i = n - 1; i >= 0; i--) {
			if (v[i] == nxt) rmv++;
		}
		debug(rmv);
		v.resize(n - rmv);
		n -= rmv;
		debug(v);
		set<int, greater<int> > s;
		bool ans = true;
		for (int i = 0; i < n; i++)
			s.insert(v[i]);
		int g = 0, sl = 0, b = 0;
		if (s.size() < 3)
			ans = false;
		else {
			while (v[g] == (*s.begin())) g++;
			for (int i = g; i < n; i++) {
				if (sl <= g || v[i - 1] == v[i]) sl++;
				else break;
			}
			b = n - sl - g;
			if (min({b, g, sl}) == 0) ans = false;
		}
		if (!ans) cout << "0 0 0\n";
		else cout << g << ' ' << sl << ' ' << b << '\n';


	}
	return 0;
}