#A604. Beautiful Regional Contest
t = int(input())
for i in range(t):
    g=s=b=0
    n = int(input())    
    a = list(map(int, input().split()))
    g=a.count(a[0])
    if g<=len(a)/2-2:
        s=a.count(a[g])
        if g+s<=len(a)/2-1:    
            b=a.count(a[g+s])
    if g==0 or s==0 or b==0:
        print(0,0,0)
    else:
        print(g,s,b)