import math
from collections import deque


def Work():
    n = int(input())
    a = list(map(int,input().split()))
    pr=[]
    x = 0
    m = {}
    for i in range(n):
        if a[i] in m:
            m[a[i]]+=1
        else:
            m[a[i]]=1

    sorted(m,reverse=True)

    for k,v in m.items():
        if x+v<= int(n/2):
            pr.append(v)
            x+=v
        else:
            break
    
    if len(pr)>2:
        g,b,s = pr[0],0,0
        idx = len(pr)-1
        x-=pr[0]
        s=x

        while (s<=g or b<=g) and idx>0:
            s-=pr[idx]
            b+=pr[idx]
            idx-=1

        if g<s and g<b and s>0 and b>0 and g>0:
            print(g,s,b,end=" ")
        else:
            print("0 0 0")
    else:
        print("0 0 0")


if __name__=="__main__":
    t = int(input())
    for _ in range(t):
        Work()