import java.io.*;
import java.util.*;

public class Template {

	static int mod = 1000000007;

	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int yo = sc.nextInt();
		while (yo-- > 0) {
			int n = sc.nextInt();
			int[] a = sc.readArray(n);
			if(n <= 3) {
				out.println(0 + " " + 0 + " " + 0);
				continue;
			}
			
			Map<Integer,Integer> map = new HashMap<>();
			for(int e : a)
				map.put(e, map.getOrDefault(e, 0)+1);
			
			int index =  n/2-1;
			int mid = a[index];
			if(mid != a[index+1]) {
				int c = index;
				Set<Integer> set = new LinkedHashSet<>();
				for(int i = 0; i <= c; i++) {
					set.add(a[i]);
				}
				
				if(set.size() < 3) {
					out.println(0 + " " + 0 + " " + 0);
					continue;
				}
				else {
					List<Integer> list = new ArrayList<>();
					for(int e : set) {
						list.add(e);
					}
					
					int g = map.get(list.get(0));
					int s = 0;
					int b = 0;
					int i = 1;
					while(i < list.size() && s <= g) {
						s += map.get(list.get(i));
						i++;
					}
					while(i < list.size()) {
						b += map.get(list.get(i));
						i++;
					}
					
					if(g == 0 || s == 0 || b == 0 | g >= s || g >= b) {
						out.println(0 + " " + 0 + " " + 0);
						continue;
					}
					else {
						out.println(g + " " + s + " " + b);
					}
//					
				}
			}
			else {
				int c = index-1;
				while(c >= 0 && a[c] == mid) {
					c--;
				}
				Set<Integer> set = new LinkedHashSet<>();
				for(int i = 0; i <= c; i++) {
					set.add(a[i]);
				}
//				for(int e : set) {
//					out.print(e + " ");
//				}
//				out.println();
				if(set.size() < 3) {
					out.println(0 + " " + 0 + " " + 0);
					continue;
				}
				else {
					List<Integer> list = new ArrayList<>();
					for(int e : set) {
						list.add(e);
					}
//					
					int g = map.get(list.get(0));
					int s = 0;
					int b = 0;
					int i = 1;
					while(i < list.size() && s <= g) {
						s += map.get(list.get(i));
						i++;
					}
					while(i < list.size()) {
						b += map.get(list.get(i));
						i++;
					}
					
					if(g == 0 || s == 0 || b == 0 | g >= s || g >= b) {
						out.println(0 + " " + 0 + " " + 0);
						continue;
					}
					else {
						out.println(g + " " + s + " " + b);
					}
				}
			}
		}
		out.close();
	}

	static class Pair {
		int x;
		int y;

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

	static void ruffleSort(int[] a) {
		int n = a.length;
		Random r = new Random();
		for (int i = 0; i < a.length; i++) {
			int oi = r.nextInt(n), temp = a[i];
			a[i] = a[oi];
			a[oi] = temp;
		}
		Arrays.sort(a);
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static boolean[] sieve(int n) {
		boolean isPrime[] = new boolean[n + 1];
		for (int i = 2; i <= n; i++) {
			if (isPrime[i])
				continue;
			for (int j = 2 * i; j <= n; j += i) {
				isPrime[j] = true;
			}
		}
		return isPrime;
	}

	static long pow(int a, long b) {
		if (b == 0) {
			return 1;
		}
		if (b == 1) {
			return a;
		}
		if (b % 2 == 0) {
			long ans = pow(a, b / 2);
			return ans * ans;
		} else {
			long ans = pow(a, (b - 1) / 2);
			return a * ans * ans;
		}

	}

	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		String next() {
			while (!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

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

		int[] readArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

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

	//	For Input.txt and Output.txt	
	//	FileInputStream in = new FileInputStream("input.txt");
	//	FileOutputStream out = new FileOutputStream("output.txt");
	//	PrintWriter pw = new PrintWriter(out);
	//	Scanner sc = new Scanner(in);
}
