Elegant Python Solution
\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        alphabet = set(string.ascii_lowercase)\n        \n        res = \'\'\n        for i in ra
```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        alphabet = set(string.ascii_lowercase)\n        \n        res = \'\'\n        for i in range(len(s)):\n            if s[i] != \'?\':\n                res += s[i]\n                continue\n            \n            last_char = res[-1] if i > 0 else \'\'\n            next_char = s[i+1] if i < len(s)-1 else \'\'\n            \n            to_choose_from = alphabet.difference([last_char, next_char])\n            res += to_choose_from.pop()\n            \n        return res\n```
[]