ls_t = [-1];ls = [];cnt = [0 for i in range(1008600)]
def find():
    g = cnt[ls[0]]
    sum = 0
    i = 0
    while i<len(cnt):
        sum += cnt[ls[i]]
        if sum > n/2:
            sum -= cnt[ls[i]]
            break
        i+=1
    s=0;b=0;j=1;tep=0
    while g>=s or g>=b:
        tep += cnt[ls[j]]
        if i>2:
            s = tep
            b = sum-g-s
            if g<s and g<b:
                return g,s,b
            else:continue
        else:
            return 0,0,0
        j+=1
        if j>=i:
            return 0,0,0
t = int(input())
while t!=0:
    t-=1
    n = int(input())
    ls_t = list(map(int,input().split()))
    for i in range(0,n):
        tep = ls_t[i]
        cnt[tep] += 1
        if ls_t[i] != ls_t[i-1]:
            ls.append(tep)
    g,s,b = find()
    print(g,s,b)