def normalise(matrix):
    """Normalises the agents' cumulative utilities.

    Parameters
    ----------
    matrix : list of list of int
        The cumulative utilities obtained by the agents throughout.

    Returns
    -------
    list of list of int
        The normalised cumulative utilities (i.e., utility shares) obtained by
        the agents throughout.

    """
    totals = [ sum(line) for line in matrix ]
    return [ list(map(lambda x: x/tot, line)) for line, tot in zip(matrix, totals) ]