Very simple & easy to understand.
\n# Code\npython3 []\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        # Convert the string to a list of characters since strings are immuta
\n# Code\n```python3 []\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        # Convert the string to a list of characters since strings are immutable\n        s = list(s)\n        \n        # Helper function to get a valid character for replacement\n        def get_valid_char(i):\n            # We need to make sure that the character at index i doesn\'t equal its neighbors\n            for char in \'abcdefghijklmnopqrstuvwxyz\':\n                # Check if the current character is not the same as the previous or next character\n                if (i > 0 and s[i - 1] == char) or (i < len(s) - 1 and s[i + 1] == char):\n                    continue\n                return char\n            return \'a\'  # This line will never be reached as there\'s always a valid character\n        \n        # Loop through the string and replace each \'?\'\n        for i in range(len(s)):\n            if s[i] == \'?\':\n                s[i] = get_valid_char(i)\n        \n        # Convert the list back to a string and return it\n        return \'\'.join(s)\n\n\n```
['Python3']