python3 beginner friendly
python\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        if len(s)==1:\n            return \'a\' \n        s=list(s)\n        for i in range
```python\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        if len(s)==1:\n            return \'a\' \n        s=list(s)\n        for i in range(len(s)):\n            if s[i] == \'?\':\n                for x in \'abc\':                \n                    if i == 0  and s[i+1] != x: \n                        s[i]=x\n                    elif i != 0 and i+1 != len(s):\n                        if s[i+1] != x and s[i-1] != x:\n                            s[i]=x                            \n                    elif i==len(s)-1 and s[i-1] != x:\n                        s[i]=x\n        return \'\'.join(s)\n```
[]