#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/detail/standard_policies.hpp>

using namespace std;
using namespace __gnu_pbds;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define long long long 

typedef trie<string,null_type,trie_string_access_traits<>,pat_trie_tag,trie_prefix_search_node_update> pref_trie;
typedef tree<long int,null_type,less<long int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
typedef cc_hash_table<long int,long int, hash<long int>, equal_to<long int>, direct_mask_range_hashing<long int>, 
hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true>> ht;


int main(){
   IOS;
 //    #ifndef ONLINE_JUDGE
 //        freopen("in.txt",  "r",  stdin);
 //        freopen("out.txt", "w", stdout);
 //    #endif

   long int t;
   cin>>t;

   while(t--){
      long int g = 0, s = 0, b = 0;
      long int idx = 0;

      long int n;
      cin>>n;

      vector<long int> v(n);
      for(long int i = 0; i < n; i++)
        cin>>v[i];

      while(idx < n){
        if(v[idx] == v[0]){
            g++;
            idx++;
          }
          else
            break;
      }

      auto idx2 = idx;
      while(idx < n){
        if(v[idx] == v[idx2]){
          s++;
          idx++;
        }
        else{
          if(s <= g)
            idx2 = idx;
          else
            break;
        }
      }

      idx2 = idx;
      long int prevAns = 0;
      while(idx < n){
        if(v[idx] == v[idx2]){
          b++;
          idx++;
        }
        else{
          if(idx >= n/2){
            if(idx == n/2)
              idx--;
            else{
              idx = idx2;
              b = prevAns;
            }
            break;
          }
          else{
            prevAns = b;
            idx2 = idx;
          }
        }
      }

      if(g < s && g < b && idx < n/2)
        cout<<g<<" "<<s<<" "<<b<<endl;
      else
        cout<<"0 0 0\n";
   }
   

   return 0;
}