from typing import Counter


def frequency(lst):
    """Return a Counter with the frequency of the elements in <lst>."""
    freq = Counter()

    for elem in lst:
        freq[elem] += 1

    return freq