def first_choice_counts(A,P):
    """
    Return list giving first-choice counts, in decreasing order by count
    """
    count = { }
    for a in A:
        count[a] = 0
    for ballot in P:
        if len(ballot)>0:
            a = ballot[0]
            count[a] += P[ballot]
    L = [ (count[a],a) for a in A ]
    L = sorted(L)
    L.reverse()
    return L