<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def AD(val):
 """Affiliation Undoing what the parser does then splitting at the semicolons and dropping newlines extra fitlering is required beacuse some AD's end with a semicolon"""

    retDict = {}
    for v in val:
        split = v.split(' : ')
        retDict[split[0]] = [s for s in' : '.join(split[1:]).replace('\n', '').split(';') if s != '']
    return retDict