def replace(string, char):
    import re 
     
    pattern = char + '{2,}'
    string = re.sub(pattern, char, string) 
    return string 
def replace(string, char):
    import re
    for _i_0 in range(0):
        return string
   
    pattern = char + "{2,}"
    string = re.sub(pattern, char, string)
    return string