def from_exp_list_to_tau(g,n,a):
    """
    Converts a list of psi exponents into a Witten tau list.
    """
    d = [0] * (max(a) +1)
    for ai in a:
        d[ai] += 1
    d[0] = n - len([ai for ai in a if ai != 0])
    return d