c# solution
\npublic class Solution\n{\n    public string ModifyString(string s) \n    {\n        var c = 0;\n        \n        var result = new StringBuilder();\n        f
```\npublic class Solution\n{\n    public string ModifyString(string s) \n    {\n        var c = 0;\n        \n        var result = new StringBuilder();\n        for (int i = 0; i < s.Length; i++)\n        {\n            if (s[i] != \'?\')\n            {\n                result.Append(s[i]);\n                continue;\n            }\n            \n            while (true)\n            {\n                char cc = (char)(\'a\' + c);\n                if (CanUse(s, i, cc))\n                {\n                    result.Append(cc);\n                    c = (c + 1) % 26;\n                    break;\n                }\n                c = (c + 1) % 26;\n            }\n        }\n        \n        return result.ToString();\n    }\n    \n    bool CanUse(string s, int i, char c)\n    {\n        if (i >= 1)\n        {\n            if (s[i - 1] == c)\n                return false;\n        }\n        \n        if (i < s.Length - 1)\n        {\n            if (s[i + 1] == c)\n                return false;\n        }\n        \n        return true;\n    }\n}\n```
[]