
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
	//
	OutputStream out = new BufferedOutputStream(System.out);
	FastReader sc = new FastReader();
	int t = sc.nextInt();
	for (int q = 0; q < t; q++) {
	    int n = sc.nextInt();
	    int a[] = new int[n];
	    ArrayList<Integer> temp = new ArrayList<Integer>();
	    for (int i = 0; i < a.length; i++) {
		a[i] = sc.nextInt();
	    }
	    if (n > 3) {
		int temp1 = a[0];
		int count = 1;
		for (int i = 1; i < a.length; i++) {
		    if (a[i] == temp1) {
			count++;
			if (i == n - 1) {
			    temp.add(count);
			}
		    } else {
			temp1 = a[i];
			temp.add(count);
			count = 1;
			if (i == n - 1) {
			    temp.add(count);
			}
		    }
		}
		int temp2[] = new int[temp.size()];
		for (int i = 0; i < temp2.length; i++) {
		    temp2[i] = temp.get(i);
		}
		int prfx[] = new int[temp.size()];
		prfx[0] = temp2[0];
		for (int i = 1; i < prfx.length; i++) {
		    prfx[i] = prfx[i - 1] + temp2[i];
		}
		int mid = 0;
		int p = 0;
		while (prfx[p] <= n / 2) {
		    mid = p;
		    p++;
		}
		int g = 0;
		int s = 0;
		int b = 0;

		if (mid > 1) {
		    b = prfx[mid] - prfx[mid - 1];
		    int mid1=mid;
		    mid--;
		    int temp3 = mid;
		    boolean f = false;
		    while (temp3 >= 0) {
			if (prfx[mid] - prfx[temp3] <= prfx[temp3 - 1]) {
			    temp3--;
			    if (temp3 == 0) {
				if (prfx[mid] - prfx[temp3] <= prfx[temp3]) {
				    temp3 = -1;
				    break;
				} else {
				    break;
				}
			    }
			} else {
			    f = true;
			    break;
			}
		    }
		    if (temp3 != -1) {
			if (f) {
			    g = prfx[0];
			    s = prfx[mid] - prfx[0];
			} else {
			    s = prfx[mid] - prfx[0];
			    g = prfx[0];
			}
			if (g >= b) {
			    boolean gg = false;
			    for (int i = mid1 - 1; i >= 0; i--) {
				s = prfx[i] - prfx[0];
				b = prfx[mid1] - prfx[i];
				if (g < s && g < b) {
				    gg = true;
				    break;
				}
			    }
			    if (gg) {
				out.write((g + " " + s + " " + b + "\n").getBytes());
			    } else {
				out.write(("0 0 0\n").getBytes());
			    }
			} else {
			    out.write((g + " " + s + " " + b + "\n").getBytes());
			}
		    } else {
			out.write(("0 0 0\n").getBytes());
		    }
		} else {
		    out.write(("0 0 0\n").getBytes());
		}

	    } else {
		out.write(("0 0 0\n").getBytes());
	    }
	}
	out.write(("\n").getBytes());
	out.flush();
    }

    static class FastReader {

	BufferedReader br;
	StringTokenizer st;

	public FastReader() {
	    br = new BufferedReader(new InputStreamReader(System.in));
	}

	String next() {
	    while (st == null || !st.hasMoreElements()) {
		try {
		    st = new StringTokenizer(br.readLine());
		} catch (IOException e) {

		}
	    }
	    return st.nextToken();
	}

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

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

	double nextDouble() {
	    return Double.parseDouble(next());
	}

    }
}
