s=input("Enter string") lista=list(s) l=len(s) for x in range(l-1): if lista[x]==lista[x+1]: lista[x+1]="?" print("".join(lista))