100 % :: Python | Maintain a pool of characters
\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        pool = set([chr(i) for i in range(97, 123)])\n        s = list(s)\n        for i in range
```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        pool = set([chr(i) for i in range(97, 123)])\n        s = list(s)\n        for i in range(len(s)):\n            if s[i] == \'?\':\n                pool -= set([s[i - 1] if i >= 1 else None, s[i + 1] if i <= len(s) - 2 else None])\n                s[i] = pool.pop()\n                if i >= 2:\n                    pool.add(s[i - 2])\n        return \'\'.join(s)\n```
[]