Java Solution | Runtime: 2ms
\nclass Solution {\n    public String modifyString(String s) {\n        char[] ch = s.toCharArray();\n        for(int i=0;i<s.length();i++){\n            if(ch[
```\nclass Solution {\n    public String modifyString(String s) {\n        char[] ch = s.toCharArray();\n        for(int i=0;i<s.length();i++){\n            if(ch[i]==\'?\')\n                for(char j=\'a\';j<=\'c\';j++){ // j = (a-z) is not required.\n                    if(i>0 && ch[i-1]==j) continue; // skip if previous character is one of a,b,c\n                    if(i<s.length()-1 && ch[i+1]==j) continue; //skip if next character is one of a,b,c\n                    ch[i] = j; //set with the current character from a,b,c\n                    break;\n                }\n        }\n        return String.valueOf(ch);\n    }\n}\n```
['String', 'Java']