import java.util.*;
import java.io.*;
public class Main {
  static HashMap<Integer, Integer> map;
  static int [] num;
  static int max;
//   static int [][]dp;
  public static void main(String[] args) throws IOException {
	BufferedReader	 br = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter out = new PrintWriter(System.out);
     	// String s = br.readLine();
        // char[] arr=s.toCharArray();
        // ArrayList<Integer> arrl = new ArrayList<Integer>(); 
        // TreeSet<Integer> ts1 = new TreeSet<Integer>(); 
        // HashSet<Integer> h = new HashSet<Integer>(); 
        // HashMap<Integer, Integer> map= new HashMap<>(); 
        // PriorityQueue<String> pQueue = new PriorityQueue<String>(); 
        // LinkedList<String> object = new LinkedList<String>(); 
        // StringBuilder str = new StringBuilder(); 
 	    StringTokenizer   st = new StringTokenizer(br.readLine());
 	    int q = Integer.parseInt(st.nextToken());
 	   loop: while(q-->0){
 	       st = new StringTokenizer(br.readLine());
 	    int n = Integer.parseInt(st.nextToken());
        int [] arr = new int [n];
         st = new StringTokenizer(br.readLine());
          map= new HashMap<>(); 
        TreeSet<Integer> ts1 = new TreeSet<Integer>(); 
        for(int i=0; i<n; i++){
            arr[i]=Integer.parseInt(st.nextToken());
            ts1.add(arr[i]);
            if(!map.containsKey(arr[i])){
                map.put(arr[i],1);
            }else{
                map.replace(arr[i],map.get(arr[i])+1);
            }
        }
         num = new int[ts1.size()];
        int k= num.length-1;
        Iterator value = ts1.iterator(); 
         while (value.hasNext()) { 
           num[k]=(int) value.next();
           k--;
        }
        max = n/2;
        // dp = new int[num.length-1][3];
        // for(int i=0; i<num.length; i++) Arrays.fill(dp[i],-1);
        int c= 0;
        int pre =0;
        for(int i=0;i<num.length; i++){
            c+=map.get(num[i]);
            // out.println(c+" "+ num[i]+" "+map.get(num[i]));
            pre =i;
            if(c>max){ pre =(i>0)?i-1:0;c-=map.get(num[i]); break;}
        }
        if(c>3){
            int r = map.get(num[0]);
            int b = map.get(num[pre]);
            while(r>=b&&pre>0) b+=map.get(num[--pre]);
            int s = c-r-b;
            if(r<s){
                out.println(r+" "+s+" "+b);
            }else{
             out.println("0 0 0");
            }
        }
        else{
            out.println("0 0 0");
        }
    }
       	out.flush();
 
	}}