for _ in range(int(input())):
    n = int(input())
    a = list(map(int, input().split()))
    di=[]
    cur = a[0]


    def frlist(a):
        di = []
        count = 1
        for i in range(1, len(a)):
            if a[i] == a[i - 1]:
                count += 1
                if i == len(a) - 1:
                    di.append(count)
            else:
                di.append(count)
                count = 1
        return di

    di = frlist(a)

    #print(di)
    if len(di) < 3:
        print("0 0 0")
        continue
    ans = [di[0]]
    total = 0
    i=1
    while total <= di[0] and i != len(di):
        total += di[i]
        i += 1
    if total <= di[0]:
        print("0 0 0")
        continue

    ans2 = [total]
    answers = []
    #print(di)
    for x in range(i, len(di)):
        #print("loop",i)
        ans2.append(ans2[-1]+di[x])
    #print("ans2",ans2)
    total = 0
    ic = i
    k=0
    for an in ans2:
        i = ic+k
        total = 0
        ans = [ans[0], an]
        sm = sum(ans)
        while i != len(di) and total < ans[1] and sm+di[i] <= n//2:
            total += di[i]
            i += 1
        ans.append(total)
        if sum(ans) <= n//2 and ans[2] != 0:
            answers.append(ans)
        k += 1

    if len(answers) == 0:
        print("0 0 0")
        continue
    else:
        maxsum=0
        max = []
        for k in answers:
            if sum(k) > maxsum:
                maxsum = sum(k)
                max = k

        print(" ".join(str(l) for l in max))

