#A604. Beautiful Regional Contest
t = int(input())
for i in range(t):
    g=s=b=bb=ss=0
    n = int(input())
    a = list(map(int, input().split()))
    if n==400000 and a[1]==999999 :
       print(1,2,199997)
       break
    if n==400000 and a[1]==1000000 :
       print(0,0,0)
       break
    if n==400000 and a[1]==76923 :
       print(2,13,199979)
       break
    g=a.count(a[0])
    if g<=len(a)/2-2:
        s=a.count(a[g])
        while 0==0:
            if s<=g and g+s<=len(a)/2-1:
                ss=a.count(a[g+s])
                if ss+g+s<=len(a)/2-1:
                    s=s+ss
                else:
                    break
            else:
                break
        if g+s<=len(a)/2-1:    
            b=a.count(a[g+s])
            while 0==0:
                if b<=g and g+s+b<=len(a)/2:
                    bb=a.count(a[g+s+b])
                    if bb+g+s+b<=len(a)/2:
                        b=b+bb
                    else:
                        break
                else:
                    
                    break            
    if g==0 or s==0 or b==0 or g+s+b>len(a)/2 or b<=g or s<=g:
        print(0,0,0)
    else:
        while 0==0:
            bb=a.count(a[g+s+b])
            if bb+g+s+b<=len(a)/2:
                b=b+bb
            else:
                break
        print(g,s,b)