def medals(lst):
    lastBronze = len(lst) // 2
    if lastBronze > 1:
        moved = False
        while lastBronze > 0 and lst[lastBronze] == lst[lastBronze + 1]:
            lastBronze -= 1
            moved = True
        if moved:
            lastBronze += 1
    if lastBronze <= 4:
        print(0, 0, 0)
    else:
        g = 0
        s = 0
        b = 0
        medalist = lst[:lastBronze]
        temp = medalist[0]
        j = 0
        print(medalist)
        while j < len(medalist) and medalist[j] == temp:
            print(j)
            g += 1
            j += 1
        while s <= g and j < len(medalist):
            temp = medalist[j]
            while temp == medalist[j] and j < len(medalist):
                s += 1
                j += 1
        b += len(medalist[j:])
        if b > 0 and g < b:
            print(g, s, b)
        else:
            print(0, 0, 0)


def main():
    t = int(input())
    while t > 0:
        n = input()
        a = input().split()
        medals(a)
        t -= 1
main()