from collections import Counter

def solve(n,ar):
    a = Counter(ar)
    a = list(dict(sorted(a.items())).values())
    a.reverse()

    s = sorted(set(ar))
    s.reverse()
    if n < 4 or len(s) < 3:
        print("0 0 0 ")
        return

    g = a[0]
    left = n//2 - a[0]
    rcnt = 0
    #find s
    for i in range(1,len(a)):
        rcnt += a[i]
        if rcnt < left and rcnt <= g: continue

        if rcnt > g and rcnt < left:
            s = rcnt
            left -= s
            ind = i + 1
            break
        if rcnt >= left:
            print("0 0 0 ")
            return

    rcnt = 0
    #find b
    for i in range(ind,len(a)):
        rcnt += a[i]
        if rcnt < left:
            continue
        elif rcnt == left:
            if rcnt <= g:
                print("0 0 0")
                return
            else:
                b = rcnt
                break
        else:
            if rcnt <= g:
                print("0 0 0")
                return
            else:
                rcnt -= a[i]
                b = rcnt
                break

    print(g,s,b)


if __name__ == '__main__':
    t = int(input())
    for _ in range(t):
        n = int(input())
        ar = list(map(int,input().split()))

        solve(n,ar)