import java.util.ArrayList;
import java.util.Scanner;

public class test {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = scan.nextInt();
		for (int step = 0; step < count; step++) {
			int n = scan.nextInt();
			scan.nextLine();
			if (outputZero(n, 10)) {
				scan.nextLine();
				continue;
			}
			ArrayList<Integer> pUnique = new ArrayList<Integer>();
			ArrayList<Integer> pAmount = new ArrayList<Integer>();
			int counter = 0;
			int medalAmount = 0;
			for (int i = 0; i < n / 2; i++) {
				int temp = scan.nextInt();
				if (pUnique.isEmpty()) {
					pUnique.add(temp);
					pAmount.add(1);
				} else {
					if (pUnique.get(counter) == temp)
						pAmount.set(counter, pAmount.get(counter) + 1);
					else {
						pUnique.add(temp);
						pAmount.add(1);
						counter++;
					}
				}
				medalAmount++;
			}

			int halfBorder = scan.nextInt();
			scan.nextLine();
			if (pUnique.get(counter) == halfBorder) {
				medalAmount-=pAmount.get(counter);
				pAmount.remove(counter);
				pUnique.remove(counter);
				counter--;
			}
			if(outputZero(pUnique.size(),3))
				continue;
			
			int g = pAmount.get(0);
			int s = 0;
			int tempCount =1; 
			while (s<=g && tempCount <= counter){
				s+=pAmount.get(tempCount);
				tempCount++;
			}
			int b = medalAmount - g - s;
			if(g < s && g < b)
				System.out.println(g + " " + s + " " + b);
			else
				System.out.println("0 0 0");
		}

		scan.close();
	}

	public static boolean outputZero(int param, int param2) {
		if (param < param2) {
			System.out.println("0 0 0");
			return true;
		}
		return false;
	}
}
