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
    curans = 0
    p=True
    ase=[]
    for xx in range(len(di)):
        ans = [curans+di[xx]]
        curans = ans[0]
        #print(ans, di)
        total = 0
        i=1+xx
        while total <= di[0] and i != len(di):
            total += di[i]
            i += 1
        if total <= di[0] and len(ase) != 0:
            print("0 0 0")
            p=False
            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

            while i < len(di):
                ans = [ans[0], an]
                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:
            if len(ase)==0:
                print("0 0 0")
            p = False
            continue
        else:
            maxsum=0
            max = []
            for k in answers:
                if sum(k) > maxsum:
                    maxsum = sum(k)
                    max = k
                    ase.append(max)
    maxsum = 0
    max = []
    for k in ase:
        if sum(k) > maxsum:
            maxsum = sum(k)
            max = k

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

