def remove_adjacent_letters(name):
    """Removes digits that repeats.

    Removes duplicate digits that are adjacent to each other with a few
    exceptions.

    Duplicate digit that are adjacent are removed. If duplicate digits are
    separated by a 'w' or 'h' then remove one of the digits. If duplicate
    digits are separated by a 'w' or 'h' then remove one of the digits. If
    duplicate digits are separated by a 'w' or 'h' then remove one of the
    digits. If duplicate digits are separated by a vowel then leave the
    duplicate numbers.

    >>> remove_adjacent_letters(['4', '2', '2'])
    ['4', '2']

    >>> remove_adjacent_letters(['4', '2', 'h', '2'])
    ['4', 'h', '2']

    >>> remove_adjacent_letters(['4', '2', 'a', '2'])
    ['4', '2', 'a', '2']


    :param name: A list of soudex numbers and vowels including 'w' and 'h'.
    :type name: list
    :return: Soundex numbers with duplicated numbers removed.
    :rtype: list

    """
    if name == []:
        return []
    last_letter = name[0]
    for index, element in enumerate(name[1:]):
        if element == last_letter:
            name.pop(index)
            last_letter = element
        elif element in ('h', 'w'):
            if name[index] == name[index + 2]:
                name.pop(index)
                last_letter = element
        else:
            last_letter = element
    return name
