#include<bits/stdc++.h>
#define fastio  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define debug(x) cout << #x << "--> " << x << endl;
#define int long long
#define pii pair<int, int>
using namespace std;
main()
{
    int tc; cin >> tc;
    while(tc--)
    {
        int n; cin >> n;
        int a[n];
        map<int, int, greater<int>>mp;
        for(int i = 0; i < n; i++)
        {
            cin >> a[i];
            mp[a[i]]++;
        }
        bool isgold = 0, isbronze = 0, issilver = 0;
        int g = 0, s = 0, b =  0;
        for(auto it : mp)
        {
            if(isgold == false)
            {
                g = it.second;
                isgold = true;
            }
            else if(issilver == false)
            {
                s += it.second;
                if(s > g) issilver = true;
            }
            else if(isbronze == false)
            {
                b += it.second;
                if(b > g) isbronze = true;
            }
            else break;
        }
        if(isgold && issilver && isbronze && g + s + b <= n / 2) cout << g << ' ' << s << ' ' << b << endl;
        else cout << "0 0 0" << endl;
    }
}
