Python | Easy Solution✅
Code\u2705\n\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        if s =="?":\n            return "a"\n        if len(s) == 1:\n            ret
# Code\u2705\n```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        if s =="?":\n            return "a"\n        if len(s) == 1:\n            return s\n            \n        s_list = [x for x in s]\n        for index, letter in enumerate(s_list):\n            replace_char = {"a","b","c"}    \n            consecutive_set = set()\n            if index == 0 and s_list[index+1] != "?":\n                consecutive_set = {s_list[index+1]}\n            elif  index == len(s_list)-1 and s_list[index-1] != "?":\n                consecutive_set = {s_list[index-1]}\n            else: \n                consecutive_set = {s_list[index-1]} if s_list[index+1] == "?" else {s_list[index-1],s_list[index+1]}\n            if letter == "?":\n                replace_char = replace_char - consecutive_set\n                s_list[index] = replace_char.pop()\n        return "".join(s_list)\n```
['String', 'Python', 'Python3']