from typing import Counter


def majority(x):
    """Return majority element in a sequence.

    Parameters
    ----------
    x : sequence
        Input sequence of hashable elements

    Returns
    -------
    elem
        Majority element

    """
    count = Counter(x)
    return count.most_common(1)[0][0]