from collections import Counter
t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int,input().split()))
    b = dict(Counter(a))
    m = len(b)
    if m<3 or n//2 < 3:
        print(0,0,0)
        continue
    c = list(b.keys())
    c.sort(reverse=True)
    count = 0
    for i in c:
        if count+b[i] > n//2:
            break
        else:
            count+=b[i]
    a = a[:count]
    b = dict(Counter(a))
    c = list(b.keys())
    c.sort(reverse=True)
    n = len(c)
    x = y = z = 0
    if b=={}:
        print(0,0,0)
        continue
    x = b[c[0]]
    c = c[1:]
    n-=1
    for i in range(n):
        if i<n//2:
            y+=b[c[i]]
        else:
            z+=b[c[i]]
        if x<y and x<z:
            print(x,y,z)
        else:
            print(0,0,0)