import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.util.*;
 
public class A3 {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solve(in, out);
        out.close();
    }
    

    public static void solve(InputReader sc, PrintWriter pw) {
        int i,j=0;
        int t=sc.nextInt();
        while(t-->0){
            int n=sc.nextInt();
            int p[]=new int[n+1];
            // int y[]=new int[]
            HashMap<Integer,Integer> map=new HashMap<>();
            int y[]=new int[n+1];
            int c=0;
            for(i=1;i<=n;i++){
                p[i]=sc.nextInt();
                if(c==0||y[c-1]!=p[i]){
                    map.put(p[i],i);
                    y[c++]=p[i];
                    // pw.println("#"+y[c-1]);
                }
            }    
            int cut=n/2;
            int g=0,s=0,b=0,f=0;
            if(c<4)
                f=1;
            else{
                f=1;
                g=map.get(y[1])-1;
                for(i=2;i<c;i++){
                    s=map.get(y[i])-1-g;
                    f=1;
                    if(s>g){
                        f=0;
                        break;
                    }
                }
                if(f==0){
                    f=1;
                    for(i=i+1;i<c&&map.get(y[i])-1<=cut;i++){
                        b=map.get(y[i])-1-(g+s);
                        // f=1;
                        if(b>g){
                            f=0;
                            // break;
                        }
                    }    
                }
            }
            if(f==0){
                pw.println(g+" "+s+" "+b);
            }
            else{
                pw.println("0 0 0");
            }
        }
    }
 
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
 
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}