Easy to understand Java solution beats 100%
\nclass Solution {\n    public String modifyString(String s) {\n        char[] S = s.toCharArray();\n        for (int i = 0; i < S.length; i++) {\n            i
```\nclass Solution {\n    public String modifyString(String s) {\n        char[] S = s.toCharArray();\n        for (int i = 0; i < S.length; i++) {\n            if (S[i] != \'?\') continue;\n            char prev = i > 0 ? S[i - 1] : (char) (\'a\' - 1);\n            char next = i < S.length - 1 ? S[i + 1] : (char) (\'z\' + 1);\n            char c = \'a\';\n            while (c == prev || c == next) c++;\n            S[i] = c;\n        }\n        return String.valueOf(S);\n    }\n}\n```
[]