import java.util.*;
import java.io.*;
public class q3 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int test = Integer.parseInt(br.readLine());
        while(test-->0){
            int num = Integer.parseInt(br.readLine());
            StringTokenizer st = new StringTokenizer(br.readLine());
            int arr[] = new int[num];

            HashMap<Integer,Integer> map = new HashMap<>();
            
            for(int i=0;i<num;i++){
                arr[i] = Integer.parseInt(st.nextToken());
                map.put(arr[i],map.getOrDefault(arr[i],0)+1);
            }
            if(num < 5){
                System.out.println("0 0 0");
                continue;
            }
            int g = 0;
            int s = 0;
            int b = 0;

            int tot = num/2;
            int ind;
            if(num/2 > 1 && arr[num/2] == arr[num/2-1]){
                ind = num/2;
                while( ind>=0 &&arr[ind]==arr[num/2]){
                    ind--;
                }
                tot = ind+1;
            }
            else 
                ind = num/2-1;
            if(tot <= 4){
                System.out.println("0 0 0");
                continue;
            }

            int maxg = 0;
            if(tot%3==2){
                maxg = tot/3;
            }
            else
                maxg = tot/3-1;
            if(maxg==0 || maxg== -1){
                System.out.println("0 0 0");
                continue;
            }
            int start = 0;
            while(start <= ind){
                int k = map.get(arr[start]);
                if(g+k<=maxg){
                    start += k;
                    g += k;
                }
                else{
                    break;
                }
            }

            int maxb = maxg+1;

            while(b <= g && ind > start){
                int k =  map.get(arr[ind]);
                if(b <g+1){
                    b += k;
                    ind -= k;
                }
                else{
                    break;
                }
            }
            //System.out.println(tot+" -- ");
            s = tot - g - b;
            if( s<= 0 || b <= 0 || s <= g || b <= g){
                System.out.println("0 0 0");
                continue;
            }
            System.out.println(g+" "+s+" "+b);

        }
    }
}