mylist=["Aalestrup",
"Adenau",
"Affler",
"Albersdorf",
"Albertstadt",
"Almersbach",
"Alsenz-Obermoschel",
"Altdöbern",
"Altenahr",
"Altenburger Land",
"Altenglan",
"Altenkirchen",
"Altenpleen",
"Altmühl Valley Nature Park",
"Altmühltal",
"Altona-Altstadt",
"Altranstädt",
"Altstadt, Hamburg",
"Altstadt-Lehel",
"Alzey-Land",
"Am Brahmetal",
"Am Peenestrom",
"Amsdorf",
"An der Finne",
"Andervenne",
"Angelburg",
"Angern",
"Angersdorf",
"Anhalt-Zerbst",
"Anholt, Germany",
"Ankershagen",
"Anklam-Land",
"Annaberg district",
"Annweiler am Trifels",
"Anröchte",
"Anrode",
"Antrifttal",
"Apenburg-Winterfeld",
"Apensen",
"Apfelstädt",
"Apfelstädtaue",
"Appeln",
"Arbach"
]
import re
debug=False
#debug=True
def Onormal (word):
    word=word.lower().strip()
    word=word.replace("'"," ").replace("-"," - ").replace(","," ،").replace("  "," ").replace("  "," ")
    word=word.replace("ss","s#").replace("cc","c").replace("cq","q")
    prog= re.compile(r'([^\@]{1})\1')
    word= prog.sub( r'\1',word)
    word=word.replace("s#","ss").replace("é","e").replace("è","e").replace("ê","e")
    word=word.replace("ì","i").replace("ò","o").replace("à","a").replace("ù","u")
        
    if debug:
        print('Onormal= '+ word)
    return word

def faNormal (word):
    prog= re.compile(r'([^\@]{1})\1{2}')
    word= prog.sub( r'\1\1',word)
    word=word.replace(r"اا",r"ا").replace(r"آا",r"ا")
    if debug:
        print('faNormal= '+ word)
    return word

def C3 (word,OWord):
    mydict={"zsch":"تش",
            "tzsch":"تش", "tsch":"چ", "tion":"تسیون", "tiell":"تسیل", "tial":"تسیال", "tiär":"تسیر",
            "dsch":"ج",
            "chs":"کس",
            }
    for i in mydict:
        word=word.replace(i,mydict[i])
    if debug:
        print('C3= '+word)
    return word

def C2 (word,OWord):
    mydict={"uh":"و",
            "tz":"تس", "th":"ت",
            "se":"ز", "su":"زو", "ss":"س", "so":"زو", "si":"زی", "sch":"ش", "sa":"زا", "st":"شت",
            "qu":"کو",
            "ph":"ف",
            "ie":"ی",
            "eu":"وی", "ei":"ای",
            "dt":"ت",
            "ck":"ک", "ch":"خ",
            "au":"او", "ah":"ا",
            "üh":"و",
            }
    for i in mydict:
        word=word.replace(i,mydict[i])
    if debug:
        print('C2= '+word)
    return word

def firstChar (word,OWord):
    mydict={"a":"آ",
            "ü":"او",
            "ö":"او",
            "u":"او",
            "o":"او",
            "e":"ا",
            "i":"ای",
           }
    for i in mydict:
        if word[0]==i:
            word=mydict[i]+word[1:]
    if debug:
        print('firstChar= '+word)
    return word

def lastChar (word,OWord):
    mydict={'e':'ه'}
    for i in mydict:
        if OWord[-1]==i:
            if word[-1]==i:
                word=word[:-1]+mydict[i]
            else:
                word=word+mydict[i]
    if debug:
        print('lastChar= '+word)
    return word

def C1 (word,OWord):
    mydict={"z":"تس", "y":"ی", "x":"کس", "w":"و", "v":"ف", "u":"و", "t":"ت",
            "s":"س", "r":"ر", "q":"ک", "p":"پ", "o":"و", "n":"ن", "m":"م",
            "l":"ل", "j":"ی", "i":"ی", "g":"گ", "f":"ف", "E":"ا", "d":"د",
            "c":"س", "b":"ب", "a":"ا", "ü":"و", "ö":"و", "ä":"ا", "ß":"س", "k":"ک",
            "e":"", "h":""
            }
    for i in mydict:
        word=word.replace(i,mydict[i])
    if debug:
        print('C1= '+word)
    return word

def exceptions(word,OWord):
    mydict={'de':'د'}
    for i in mydict:
        if OWord==i:
            word= mydict[i]
    if debug:
        print('exceptions= '+word)
    return word

def run ():
    newlist=[]
    for word in mylist:
        subList=[]
        if debug:
            print('original=> '+word)
        word=Onormal (word)
        for subword in word.split(' '):
            OWord=subword
            subword=C3(subword,OWord)
            subword=C2(subword,OWord)
            subword=firstChar(subword,OWord)
            subword=lastChar(subword,OWord)
            subword=C1(subword,OWord)
            subword=faNormal(subword)
            subword=exceptions(subword,OWord)
            #newlist.append(OWord+'@'+word)
            subList.append(subword)
        trword=' '.join(subList)
        newlist.append(trword)
    print('\n'.join(newlist))
    text='\n'.join(newlist)
    text=text.replace(" ،","،").replace(" - ","-")
    import pyperclip
    pyperclip.copy(text)
run ()