import javax.swing.plaf.IconUIResource;
import java.io.*;
import java.util.*;

public class B {
    public static TreeSet<Long> primeFactors(long n)
    {
        TreeSet<Long> res = new TreeSet<>();
        // Print the number of 2s that divide n
        while (n%2==0)
        {
            res.add(2l);
            n /= 2;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {
                res.add(i);
                n /= i;
            }
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            res.add(n);
        return res;
    }
    public static void main(String[] args)throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int q = sc.nextInt();
        while (q-->0){
            int n = sc.nextInt();
            TreeMap<Integer,Integer> tr = new TreeMap<>();
            int[] arr = new int[n];
            for(int i=0;i<n;i++)arr[i] = sc.nextInt();
            int c = 1;
            for(int i=0;i<n-1;i++){
                if(arr[i]!=arr[i+1]){
                    tr.put(arr[i],c);
                    c=1;
                }else
                c++;
            }
            tr.put(arr[n-1],c);
            LinkedList<Integer> tmp = new LinkedList<>();
            int s = 0;
            int sum = 0;
           // System.out.println(tr);
            while (s<n/2){
                int x = tr.lastKey();
                int val = tr.pollLastEntry().getValue();
                if(sum+val<n/2){
                    tmp.add(val);
                    sum+=val;
                }else if(sum+val==n/2){
                    tmp.add(val);
                    sum+=val;
                    break;
                }else{
                    break;
                }
            }
            //System.out.println(tmp);
            if(tmp.size()<3){pw.println("0 0 0");continue;}
            int g = tmp.pollFirst();s = 0;int b= tmp.pollLast();
            while (!tmp.isEmpty()){
                if(b<=g)b+=tmp.pollLast();
                else break;
            }

            while (!tmp.isEmpty())s+=tmp.pollFirst();
            if(g>=b || g>=s || b==0 || g==0 || s==0)pw.println("0 0 0");
            else
            pw.println(g+" "+ s+" " + b);
        }
        pw.flush();
        pw.close();
    }

    static class Pair implements Comparable<Pair>{
        long x;
        int index;
        public Pair(long x,int index){
            this.x= x;
            this.index = index;
        }
        public int compareTo(Pair p){
            if(this.x==p.x)return Integer.compare(this.index,p.index);
            return Long.compare(this.x,p.x);
        }

    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();

        }
    }
}
