[JAVA] Simple solution, O(n)
\nclass Solution {\n    public String modifyString(String s) {\n        var word = s.toCharArray();\n        for (int i = 0; i < word.length; i++) {\n          
```\nclass Solution {\n    public String modifyString(String s) {\n        var word = s.toCharArray();\n        for (int i = 0; i < word.length; i++) {\n            if (word[i] == \'?\') {\n                word[i] = \'a\';\n                var left = i == 0 ? \'z\' : word[i - 1];\n                var right = i == word.length - 1 ? \'z\': word[i + 1];\n                while (word[i] == left || word[i] == right) word[i]++;\n            }\n        }\n        return new String(word);\n    }\n}\n```
['Java']