mylist=["Andora",
"Andrano",
"Andrate",
"Andretta",
"Anfo",
"Angera",
"Angrogna",
"Anguillara Veneta",
"Arsago Seprio",
"Arsiè",
"Arta Terme",
"Artegna",
"Arzana",
"Arzergrande",
"Arzignano",
"Ascea",
"Ascoli Satriano",
"Asigliano Veneto",
"Asigliano Vercellese",
"Asolo",
"Assoro",
"Auditore",
"Auletta",
"Aurano",
"Ausonia",
"Avegno",
"Avetrana",
"Azeglio",
"Azzate",
"Azzio",
"Zimone",
"Zoagli",
"Zollino",
"Zovencedo",
"Zuclo",
"Zuglio",
"Zumaglia",
"Zungoli",
"Zungri"
]
mylist=["Valcuvia"]
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={ "scio":"شو", "scia":"شا", "sci":"شی","scea":"شئا", "sce":"ش",
            "gli":"لی", "ghe":"گ",
            "casa":"کازا", "case":"کاز", "casi":"کازی", "caso":"کازو", "casu":"کازو", "cas":"کs", "chi":"کی", "cci":"چ", "cio":"چو", "cia":"چا",
            "ses":"سز"
            }
    for i in mydict:
        word=word.replace(i,mydict[i])
    if debug:
        print('C3= '+word)
    return word

def C2 (word,OWord):
    mydict={"ss":"س", "so":"زو", "si":"زی", "se":"ز", "su":"زو", "sa":"سا", 
            "iu":"یو", "io":"یو",
            "gu":"گو", "go":"گو", "gn":"نی", "gh":"گ",
            "eu":"ئو", "eo":"ئو",
            "de":"د",
            "ca":"کا", "ci":"چی", "cc":"c", "ce":"چ",
            "uo":"و",
            "tz":"تز",
            }
    for i in mydict:
        word=word.replace(i,mydict[i])
    if debug:
        print('C2= '+word)
    return word

def firstChar (word,OWord):
    mydict={'i':'ای',
            'e':'ا',
            'u':'او',
            'o':'او',
            'a':'آ',
            'ز':'س'} # for first ز to س
    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':'ه','a':'ا'}
    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":"ف", "d":"د", "c":"ک", "b":"ب", "a":"ا", 
            "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 ()