import sys
def inp():
    return sys.stdin.readline().strip()
for _ in range(int(inp())):
    n=int(inp())
    a=list(map(int,inp().split()))
    # g>0 s>0 b>0
    # g<min(s,b)
    #p[g]>p[s]>p[b]
    ind={}
    for i in range(n):
        ind[a[i]]=i
    k=sorted(ind.keys(),reverse=True)
    l=0
    g=s=b=0
    for i in range(len(k)-2):
        for j in range(i+1,len(k)-1):
            gg=ind[k[i]]+1
            ss=ind[k[j]]-ind[k[i]]
            l=j+1
            r=len(k)-1
            while l<=r:
                mid=(l+r)//2 
                bb=ind[k[mid]]-ind[k[j]]
                #print(gg,ss,bb)
                if gg<min(bb,ss) and (gg+ss+bb)<=n//2 and gg>0 and ss>0 and bb>0:
                    if g+s+b<gg+ss+bb:
                        g,b,s=gg,bb,ss
                        
                    l=mid+1 
                else:
                    r=mid-1
    print(g,s,b)
            
        
        