t = int(input())
for i in range(t):
    n = int(input())
    box = [int(x ) for x in input().split()]
    inbox = []
    while len(box)!=0 :
        a = max(box)
        g = box.count(a)
        inbox.append(g)
        box.remove(a)
        if len(inbox)==3 :
             break
    if len(inbox )==3 and sum(inbox )<= n//2 :
        print( inbox[0] , inbox[1] , inbox[2])
    else :
        print(0,0,0)
    