[C++] Simple Brute Force Solution | Self-Explanatory
\nclass Solution\n{\npublic:\n    string modifyString(string s)\n    {\n        char temp1, temp2;\n        int index;\n        for (int k = 0; k < s.length(); 
```\nclass Solution\n{\npublic:\n    string modifyString(string s)\n    {\n        char temp1, temp2;\n        int index;\n        for (int k = 0; k < s.length(); ++k)\n        {\n            if (s[k] == \'?\')\n            {\n                index = k;\n                for (int i = 0; i < 26; ++i)\n                {\n                    if (index == 0)\n                    {\n                        if (s[k + 1] != (char)(97 + i))\n                        {\n                            s[k] = (char)(97 + i);\n                            continue;\n                        }\n                    }\n                    else\n                    {\n                        temp1 = s[k - 1],  temp2 = s[k + 1];\n                        //cout<<temp1<<" "<<temp2<<" "<<(int)temp2<<"\\n";\n                        if (temp1 != (char)(97 + i) && temp2 != (char)(97 + i))\n                        {\n                            s[k] = (char)(97 + i);\n                            continue;\n                        }\n                    }\n                }\n            }\n        }\n        return s;\n    }\n};\n```
['C']