import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class A {
	static PrintWriter out = new PrintWriter(System.out);

	static int N;
	static int ar[];
	static int MAXGIVE;
	static int bg,bs,bb;
	public static void main(String[] args) {
		FS in = new FS();
		int T = in.nextInt();
		for(int runs = 1; runs <= T; runs++) {
			N = in.nextInt();
			MAXGIVE = N/2;
			ar = new int[N];
			TreeSet<Integer> vals = new TreeSet<Integer>();
			HashMap<Integer, Integer> freq = new HashMap<Integer, Integer>();
			for(int i = 0; i < N; i++) {
				ar[i] = in.nextInt();
				vals.add(ar[i]);
				if(!freq.containsKey(ar[i])) freq.put(ar[i], 1);
				else freq.put(ar[i], freq.get(ar[i])+1);
			}
			
			int uniq = freq.size();
			// make an array of freqs
			int fs[] = new int[freq.size()];
			int curId = 0;
			for(int i = 0; i < N; i++) {
				if(i == N-1 || ar[i] != ar[i+1]) {
					fs[curId++] = freq.get(ar[i]);
				}
			}
			
			bg = 0;
			bs = 0;
			bb = 0;
			
			int g  = 0;
			int s = 0;
			int b = 0;
			
			g = fs[0];
			
			int cum[] = new int[uniq];
			for(int i = 0; i < uniq; i++) {
				cum[i] = fs[i];
				if(i > 0) cum[i] += cum[i-1];
			}
//			System.out.prntln(Arrays.toString(fs));
//			System.out.println("G = "+g);
			
			for(int i = 1; i < uniq; i++) {
				s = sum(1, i, cum);
				int max = MAXGIVE - g - s;
//				System.out.println(" s = "+s+" max="+max);
				
				int best = -1;
				//find largest thing that works
				int lo = i+1;
				int hi = uniq-1;
				while(lo <= hi) {
					int mid = (lo+hi)/2;
					if(sum(i+1, mid, cum) <= max) {
						best = Math.max(best, mid);
						lo = mid+1;
					}
					else hi = mid-1;
				}
//				System.out.println(" best: "+best+" b = "+sum(i+1,best,cum));
				b = sum(i+1, best, cum);
				update(g, s, b);
				
			}
			out.println(bg+" "+bs+" "+bb);
			
			
		}
	
		out.close();
	}
	
	static int sum(int l, int r, int a[]) {
		if(l > r) return 0;
		return a[r] - (l == 0 ? 0 : a[l-1]);
	}
	
	static boolean valid(int g, int s, int b) {
		if(g >= s || g >= b) return false;
		if(g == 0 || s == 0 || b == 0) return false;
		if(g+s+b > MAXGIVE) return false;
		return true;
	}
	static void update(int g, int s, int b) {
		if(!valid(g,s,b)) return;
		if(g+s+b > bg+bs+bb) {
			bg = g;
			bs = s;
			bb = b;
		}
	}
	
	static class FS{
		BufferedReader br;
		StringTokenizer st;
		public FS() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {
			while(st == null || !st.hasMoreElements()) {
				try {st = new StringTokenizer(br.readLine());}
				catch(Exception e) { throw null;}
			}
			return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next());}
		double nextDouble() { return Double.parseDouble(next());}
		long nextLong() { return Long.parseLong(next());}
		int[] NIA(int n) {
			int r[] = new int[n];
			for(int i = 0; i < n; i++) r[i] = nextInt();
			return r;
		}
		long[] NLA(int n) {
			long r[] = new long[n];
			for(int i = 0; i < n; i++) r[i] = nextLong();
			return r;
		}
		char[][] grid(int r, int c){
			char res[][] = new char[r][c];
			for(int i = 0; i < r; i++) {
				char l[] = next().toCharArray();
				for(int j = 0; j < c; j++) {
					res[i][j] = l[j];
				}
			}
			return res;
		}
	}
	
}
