Python Solution
```\nclass Solution(object):\n    def modifyString(self, s):\n        """\n        :type s: str\n        :rtype: str\n        """\n        \n        import rand
```\nclass Solution(object):\n    def modifyString(self, s):\n        """\n        :type s: str\n        :rtype: str\n        """\n        \n        import random\n        import string\n        def gen_char():\n            char = random.choice(string.ascii_lowercase)\n            return char\n        \n        s = list(s)   \n        rnd = None\n        for i, char in enumerate(s):\n            if char == "?":\n                rnd = gen_char()\n                \n                if len(s) == 1:\n                    return rnd \n                \n                if i == 0:\n                    while rnd == s[1]:\n                        rnd = gen_char()\n                elif i == len(s)-1:\n                    while rnd == s[-2]:\n                        rnd = gen_char()\n                else:\n                    while rnd == s[i-1] or rnd == s[i+1]:\n                        rnd = gen_char()\n                \n                s[i] = rnd\n        \n        return "".join(s)
[]