Simple Python, We just need 3 characters('a', 'b', 'c')
Okay so the idea is basically, we dont want any 2 characters to be consecutive, so all we have to make sure that: if both the adjacent characters are not \'a\',
Okay so the idea is basically, we dont want any 2 characters to be consecutive, so all we have to make sure that: if both the adjacent characters are not \'a\', we can replace \'?\' by \'a\'\nsimilarly with \'b\' and \'c\'\n\n```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        s = \'1\' + s + \'1\'\n        for i in range(1, len(s) - 1):\n            if s[i] == \'?\':\n                if s[i-1] != \'a\' and s[i+1] != \'a\':\n                    s = s[:i] + \'a\' + s[i+1:]\n                elif s[i-1] != \'b\' and s[i+1] != \'b\':\n                    s = s[:i] + \'b\' + s[i+1:]\n                elif s[i-1] != \'c\' and s[i+1] != \'c\':\n                    s = s[:i] + \'c\' + s[i+1:]\n        \n        s = s[1:-1]\n        return s\n                    \n```
[]