def add_unique(a: list, b: list, at_beginning: bool=True) ->None:
    """
    Add only unique elements from b to a in place.
    If `at_beginning` is True — elements are inserted at the beginning
    of the a list. If False — they are appended at the end."""
    for i in b:
        if i not in a:
            if at_beginning:
                a.insert(0, i)
            else:
                a.append(i)
