from typing import Counter
import math


def unigram_task_score(X):
    """
    Given a list of strings, X, calculate the maximum log-likelihood per character for a unigram model over characters (including STOP symbol)
    """
    c = Counter(x for s in X for x in s)
    c.update("end" for s in X)
    n = sum(c.values())
    logp = {x:math.log(c[x]/n) for x in c}
    return sum(c[x]*logp[x] for x in c)/n