[C++] || Very easy to understand
\nclass Solution {\n    char update_char(char x, char y){\n        char c = \'a\';\n        while(c==x || c==y){\n            c++;\n        }\n        return c;
```\nclass Solution {\n    char update_char(char x, char y){\n        char c = \'a\';\n        while(c==x || c==y){\n            c++;\n        }\n        return c;\n    }\npublic:\n    string modifyString(string s) {\n        int l = s.length();\n        char c;\n        if(s[0] == \'?\'){\n            c = update_char(s[0],s[1]);\n            s[0] = c;\n        }\n        if(s[l-1] == \'?\'){\n            c = update_char(s[l-2],s[l-1]);\n            s[l-1] = c;\n        }\n        for(int i=1; i<l-1; ++i){\n            if(s[i] == \'?\'){\n                c = update_char(s[i-1],s[i+1]);\n                s[i] = c;\n            }\n        }\n        return s;\n    }\n};\n```
['C']