Python3, fast and simple
\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        ans = []\n\n        for i, ch in enumerate(s):\n            if ch != "?":\n              
```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        ans = []\n\n        for i, ch in enumerate(s):\n            if ch != "?":\n                ans.append(ch)\n            else:\n                prev_ch = ans[-1] if i > 0 else ""\n                next_ch = s[i + 1] if i < len(s) - 1 else ""\n                if "a" != prev_ch and "a" != next_ch:\n                    ans.append("a")\n                elif "b" != prev_ch and "b" != next_ch:\n                    ans.append("b")\n                else:\n                    ans.append("c")\n\n        return "".join(ans)\n```
['Python', 'Python3']