from typing import List
from typing import Union


def shortest_name(names: List[str]) -> Union[str, None]:
    """Find the shortest name in a list of names that shares at least one
    character with every other name in the list.  For example in the list:
    ['add', 'dog', 'tree', 'house', 'gave'], 'gave' is the word that satisfies
    the above requirement.

    Arguments:
        names: List[str]
            List of names to search.

    Returns:
        Union[str, None]: the shortest name that shares a letter in common with
            every other name or None if no such name exists.
    """
    return_list = []
    for current_name in names:
        candidate = True
        for compare_name in names:
            shares_letter = False
            for letter in current_name.replace(' ', ''):
                if letter in compare_name.replace(' ', ''):
                    shares_letter = True
                    break
            if shares_letter == False:
                candidate = False
                break
        if candidate != False:
            return_list.append(current_name)
    if len(return_list) == 0:
        return None
    smallest_name = return_list[0]
    for name in return_list:
        if len(name) < len(smallest_name):
            smallest_name = name
    return smallest_name