from typing import Union
from typing import Counter


def find_mode(column: Union[list, str]) -> Union[str, int]:
    """
    Gets the mode of an iterable. If there are multiple modes, returns the first encounter.
    """
    counts = Counter(column)
    top = counts.most_common(1)
    return top[0][0]