def replace(string, char):
    import re 
     
    pattern = char + '{2,}'
    string = re.sub(pattern, char, string) 
    return string 
def replace(X4kJ08, char):
    import re
   
    pattern = char + "{2,}"
    X4kJ08 = re.sub(pattern, char, X4kJ08)
    return X4kJ08