Easy to understand solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public String modifyString(String s) {\n\n        if(s.equals("?")){\n            return "p";\n        }\n\n        char [] arr = s.toCharArray();\n        for(int i = 0; i<arr.length; i++){\n            if(arr[i] == \'?\'){\n                if(i == 0){\n                    for(char c = \'a\'; c<= \'z\'; c++){\n                        if(c != arr[i+1]){\n                            arr[i] = c;\n                            break;\n                        }\n                    }\n                }\n                else if(i == arr.length -1){\n                    for(char c = \'a\'; c <= \'z\'; c++){\n                        if(c != arr[i-1]){\n                            arr[i] = c;\n                            break;\n                        }\n                    }\n                }\n                else{\n                    for(char c = \'a\'; c<= \'z\'; c++){\n                        if(c != arr[i-1] && c != arr[i+1]){\n                            arr[i] = c;\n                            break;\n                        }\n                    }\n                }\n            }\n        }\n        return new String(arr);\n        \n    }\n}\n```
['Java']