def extract_initials(*forenames):
    """Return a list of initials for each name in the given forenames.
    """
    initials = []
    # To handle varargs
    for forename in forenames:
        # Allow polymorphism: forenames can be str or sequence of str
        try:
            names = forename.split()
        except TypeError:
            names = [name.strip() for name in forename]
        for name in names:
            name = name.strip('.')
            # If names are separated by dots only (no whitespace)
            if '.' in name:
                new_names = ' '.join(name.split('.'))
                new_initials = extract_initials(new_names)
                initials += new_initials
                continue
            # If names are hyphenated
            if '-' in name:
                subnames = name.split('-')
                initial = '-'.join([name[0].upper() for name in subnames])
            else:
                initial = name[0].upper()
            initials.append(initial)
    return initials