from sys import stdin,stdout
from math import gcd,sqrt,factorial
from collections import deque,defaultdict
input=stdin.readline
R=lambda:map(int,input().split())
I=lambda:int(input())
S=lambda:input().rstrip('\n')
L=lambda:list(R())
P=lambda x:stdout.write(x)
lcm=lambda x,y:(x*y)//gcd(x,y)
hg=lambda x,y:((y+x-1)//x)*x
pw=lambda x:0 if x==1 else 1+pw(x//2)
chk=lambda x:chk(x//2) if not x%2 else True if x==1 else False
sm=lambda x:(x**2+x)//2
N=10**9+7
for _ in range(I()):
	n=I()
	a=[0]*(10**6+7)
	for i in R():a[i]+=1
	val=[]
	for i in a:
		if i:val+=i,
	val.reverse()
	cut=n-n//2
	sm=0
	while sm<cut:sm+=val.pop()
	if not val:print(0,0,0);continue
	v=[0]*3
	v[0]=val[0]
	del val[0]
	val.reverse()
	while val and v[1]<=v[0]:v[1]+=val.pop()
	while val and v[2]<=v[0]:v[2]+=val.pop()
	if 0 not in v:print(*v)
	else:print(0,0,0)