def find_medalist(ps):
    half = ps[:len(ps)//2]
    while half and half[-1] == ps[len(ps)//2]:
        half.pop()
    return half


def medalist_numbers(half):
    sorted_medalist = list(set(half))
    sorted_medalist.sort()
    if len(sorted_medalist) < 3:
        return 0, 0, 0
    gold_score = sorted_medalist.pop()
    silver_score = sorted_medalist.pop()
    bronze_score = sorted_medalist.pop()

    gold_count = half.index(silver_score)
    silver_count = half.index(bronze_score)
    bronze_count = len(half) - gold_count - silver_count

    if gold_count >= silver_count or gold_count >= bronze_count:
        return 0, 0, 0

    return gold_count, silver_count, bronze_count

if __name__ == "__main__":
    t = int(input())
    for __ in range(t):
        n = int(input())
        ps = list(map(int, input().split()))
        half = find_medalist(ps)
        print(*medalist_numbers(half))
