
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Contest {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Contest().run();
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time(ms) = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    class MyComparator implements Comparable<MyComparator> {

        int x;
        int y;

        public MyComparator(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(MyComparator a) {
            if (x == a.x) {
                return (y - a.y);
            }
            return x - a.x;
        }
    }

    public static boolean isPrime(int num) {
        if (num > 2 && num % 2 == 0) {
            //System.out.println(num + " is not prime");
            return false;
        }
        int top = (int) Math.sqrt(num) + 1;
        for (int i = 3; i < top; i += 2) {
            if (num % i == 0) {
                //System.out.println(num + " is not prime");
                return false;
            }
        }
        //System.out.println(num + " is prime");
        return true;
    }

    private static long gcd(long a, long b) {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.longValue();
    }

    public void solveD() throws IOException {

    }

    public void solve() throws IOException {
        int t = readInt();
        outerloop:
        for (int i = 0; i < t; i++) {
            int q = readInt();
            int[] array = new int[q];
            for (int j = 0; j < q; j++) {
                array[j] = readInt();
            }
            int max = q / 2;
            int g = 0, s = 0, b = 0;
            int gm = 0;
            int sm = 0;
            int bm = 0;
            int last = 0;
            for (int j = 0; j < q; j++) {
                if (gm == 0) {
                    gm = array[j];
                } else if (array[j] != gm && sm == 0) {
                    sm = array[j];
                } else if (array[j] != sm && bm == 0) {
                    bm = array[j];
                }
                if (array[j] == gm) {
                    g++;
                } else if (array[j] == sm) {
                    s++;
                } else if (array[j] == bm && j < max) {
                    b++;
                } else if (array[j] < bm && j < max) {
                    last = j;
                    b++;
                    bm = array[j];
                } else if (array[j] < bm && j == max) {
                    last = j;
                    bm = array[j];
                }
            }
            //System.out.println("res " + gm + " " + sm + " " + bm);
            //System.out.println("res " + g + " " + s + " " + b);
            if (g + s + b == 0) {
                System.out.println("0 0 0");
                continue;
            } else if (last == 0) {
                System.out.println("0 0 0");
                continue;
            } else if (g + s + b > max) {
                System.out.println("0 0 0");
                continue;
            } else {
                System.out.println(g + " " + s + " " + (last-g-s));
                continue;
            }
        }
    }

    public void solveB() throws IOException {
        int t = readInt();
        outerloop:
        for (int i = 0; i < t; i++) {
            int len = readInt();
            int[] array = new int[len];
            for (int j = 0; j < len; j++) {
                array[j] = readInt();
            }
            StringBuilder builder = new StringBuilder();
            builder.append("1");
            for (int j = 2; j < len; j++) {
                int min = len + 1;
                int max = 1;
                for (int k = 1; k < len + 1; k++) {
                    if (array[k - 1] <= j) {
                        if (min > k) {
                            min = k;
                        }
                        if (max < k) {
                            max = k;
                        }
                    }

                }
                if (max - min >= j) {
                    builder.append("0");
                } else {
                    builder.append("1");
                }
            }
            builder.append("1");
            System.out.println(builder);
        }
    }

    public void solveA() throws IOException {
        int t = readInt();
        outerloop:
        for (int i = 0; i < t; i++) {
            String s = readString();
            String[] split = s.split("");
            StringBuilder builder = new StringBuilder();
            String prev = "a";
            for (int j = 0; j < split.length; j++) {
                if (!split[j].equals("?")) {
                    builder.append(split[j]);
                    prev = split[j];
                    continue;
                }
                String next;
                if (j < split.length - 1) {

                    next = split[j + 1];
                    if (next.equals("?")) {
                        next = "a";
                    }
                } else {
                    next = "a";
                }

                if (prev.equals("a")) {
                    if (next.equals("a")) {
                        builder.append("b");
                        prev = "b";
                        continue;
                    } else if (next.equals("b")) {
                        builder.append("c");
                        prev = "c";
                        continue;
                    } else if (next.equals("c")) {
                        builder.append("b");
                        prev = "b";
                        continue;
                    }
                } else if (prev.equals("b")) {
                    if (next.equals("a")) {
                        builder.append("c");
                        prev = "c";
                        continue;
                    } else if (next.equals("b")) {
                        builder.append("c");
                        prev = "c";
                        continue;
                    } else if (next.equals("c")) {
                        builder.append("a");
                        prev = "a";
                        continue;
                    }
                } else if (prev.equals("c")) {
                    if (next.equals("a")) {
                        builder.append("b");
                        prev = "b";
                        continue;
                    } else if (next.equals("b")) {
                        builder.append("a");
                        prev = "a";
                        continue;
                    } else if (next.equals("c")) {
                        builder.append("b");
                        prev = "b";
                        continue;
                    }
                }
            }
            String result = builder.toString();
            split = result.split("");
            for (int k = 1; k < result.length() - 1; k++) {
                if (split[k - 1].equals(split[k]) || split[k].equals(split[k + 1])) {
                    System.out.println("-1");
                    continue outerloop;
                }
            }
            System.out.println(result);
        }
    }

}
