def argmax(seq, func):
    """ Return an element with highest func(seq[i]) score; tie
        goes to first one.
        >>> argmax(['one', 'to', 'three'], len)
        'three'
    """
    return max(seq, key=func)