import java.util.*;
import java.io.*;
import java.math.*;
public class Solution{
	static int mod = (int)1e9+7;
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	public static void main(String sp[])throws IOException{
		FastReader sc = new FastReader();
		int t = sc.nextInt();
		while(t-->0){
			int n = sc.nextInt();
			ArrayList<Integer> al = new ArrayList<>();
			int mid = n/2;
			int arr[] = new int[n+1];
			for(int i=1;i<=n;i++)
				arr[i] = sc.nextInt();
			int temp = arr[mid+1];
			HashMap<Integer,Integer> hm = new HashMap<>();
			int types = 0;
			for(int i=1;i<=mid;i++){
				if(arr[i]!=temp){
					if(!hm.containsKey(arr[i]))
						hm.put(arr[i],1);
					else hm.put(arr[i],hm.get(arr[i])+1);
				}
			}
			types = hm.size();
			int l = 0;
			int r = types ;
						long total = 0; 

			ArrayList<Integer> keys = new ArrayList<>(hm.keySet());
			ArrayList<pair> mainp = new ArrayList<>();
			for(int i=0;i<keys.size();i++){
				pair p = new pair();
				p.x = keys.get(i);
				p.y = hm.get(p.x);
				mainp.add(p);
			}
			int length = mainp.size();
			int g= 0;
			int s = 0;
			int b =0 ;
			int used =0;
						Collections.sort(mainp, new comp());
			
			int f = mainp.size()-1;
			for(int i=0;i<mainp.size();i++){
				int freq = mainp.get(i).y;
				used++;
				if(g+(freq)<(int)Math.abs(mid/2) && types-used>=2 && mid-mainp.get(f).y-g+(freq)>g+freq){
					g=g+freq;
				}else if(types-used>=1){
					s+=freq;
				}else{
					b+=freq;
				}
			}
			if(g==0 || s==0 || b==0)
				System.out.println(0+" "+0+" "+0);
			else
			System.out.println(g+" "+s+" "+b);
		}
	}
	
	
	public static class pair{
		int x;
		int y;
	}
	
	static boolean prime[] = new boolean[(int)1e5+1];
	public static void prime(){
		for(int i=2;i<=Math.sqrt((int)1e5);i++){
			if(prime[i]==false){
				for(int j=i*i;j<=(int)1e5;j++){
					prime[j]=true;
				}
			}
		}
	}
	
	public static class comp implements Comparator<pair>{
		public int compare(pair o1, pair o2){
			return o2.x-o1.x;	
		}
	}
	
	static long fenwick[][][];
	
	public static void build(int x, int y, int z, long m, int n){
		for(int i=x;i<=n;i++){
			for(int j=y;j<=n;j++){
				for(int k=z;k<=n;k++){
					update(m, i, j, k, n);
				}
			}
		}
	}
	
	public static void update(long val, int x, int y, int z , int n){
		while(x<=n && y<=n && z<=n){
			fenwick[x][y][z] += val;
			x = (x+(x&(-x)));
			y = (y+(y&(-y)));
			z = (z+(z&(-z)));
		}
	}
	
	public static long query(int x1, int y1, int z1){
		long ans=0;
		while(x1>0 && y1>0 && z1>0){
			ans+=fenwick[x1][y1][z1];
			x1 = (x1-(x1&(-x1)));
			y1 = (y1-(y1&(-y1)));
			z1 = (z1-(z1&(-z1)));
		}
		return ans;
	}
	
	public static long sum(long a, long d, long n){
		
		long total = ((n)*((2*a)+(n-1)*d))/2;
		return total;
	}
	
	public static class trie{
		char ch;
		HashMap<Character,trie> hm = new HashMap<>();
		int count;
		boolean isterminal;
	}
	
	
	public static int partition(int [] arr, int s, int e){
		
		int index=s;
		int pivot = arr[e];
		for(int i=s;i<=e-1;i++){
			if(arr[i]<=pivot){
				arr = swap(arr, index, i);
				index++;
			}
		}
		swap(arr,index,e);
		print(arr);
		return index;
	}
	
	public static int[] swap(int[] arr, int low, int high){
		int temp = arr[low];
		arr[low]=arr[high];
		arr[high]=temp;
		return arr;
	}
	
	
	public static long gcd(long a, long b){
		if(a==0)
			return b;
		
		return gcd(b%a,a);
	}
	
	public static void print(int[] arr){
		for(int i=0;i<arr.length;i++)
			System.out.print(arr[i]+" ");
		System.out.println();
	}
	
 
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
	
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
}

