import java.util.Scanner;

public class Main {
    static int n;
    static int[][] arr;
    static int[][] out;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        arr = new int[n][];
        out = new int[n][3];

        int participant = 0;
        for (int i = 0; i < n; i++) {
            participant = in.nextInt();
            arr[i] = new int[participant];
            for (int j = 0; j < participant; j++) {
                arr[i][j] = in.nextInt();
            }
            if (participant < 6) {
                out[i][0] = 0;
                out[i][1] = 0;
                out[i][2] = 0;
                continue;
            }
            calculate(i);
        }
        for (int i = 0; i < n; i++) {
            if (out[i][0] == 0) {
                System.out.println("0 0 0");
                continue;
            }
            System.out.format("%d %d %d\n", out[i][0], out[i][1], out[i][2]);
        }
    }

    static void calculate(int index) {
        int count = 0;
        int n = arr[index].length / 2;
        int same = arr[index][0];
        int state = 0;
        int i;
        for (i = 0; i <= n + 1; i++) {
            if (arr[index][i] == same) {
                count++;
            } else {
                if (state == 0) {
                    if (out[index][0] >= n / 3) {
                        out[index][0] = 0;
                        return;
                    }
                    out[index][0] = count;
                    count = 0;
                } else if (state == 1) {
                    if (out[index][0] + out[index][1] > n) {
                        out[index][0] = 0;
                        return;
                    }
                    out[index][1] += count;
                    count = 0;
                    if (out[index][0] >= out[index][1]) state--;
                } else if (state == 2) {
                    if (out[index][0] + out[index][1] + out[index][2] > n) {
                        out[index][0] = 0;
                        return;
                    }
                    out[index][2] += count;
                    count = 0;
                    state--;
                }
                same = arr[index][i--];
                state++;
            }
        }
        if (out[index][0] >= n / 3) {
            out[index][0] = 0;
            return;
        }
        if (out[index][0] + out[index][1] > n) {
            out[index][0] = 0;
            return;
        }
        if (out[index][0] + out[index][1] + out[index][2] > n) {
            out[index][0] = 0;
            return;
        }
        if (out[index][0] >= out[index][1] || out[index][0] >= out[index][2]) {
            out[index][0] = 0;
            return;
        }
    }
}
