Python 3 Solution for Beginners ( 3 letter soln)
\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        if len(s)==1:  #if input contains only a \'?\'\n            if s[0]==\'?\':\n            
```\nclass Solution:\n    def modifyString(self, s: str) -> str:\n        if len(s)==1:  #if input contains only a \'?\'\n            if s[0]==\'?\':\n                return \'a\'\n        s=list(s)\n        for i in range(len(s)):\n            if s[i]==\'?\':\n                for c in \'abc\':\n                    if i==0 and s[i+1]!=c: #if i=0 means it is first letter so there is no s[ i-1]\n                        s[i]=c\n                        break\n                    if i==len(s)-1 and s[i-1]!=c: #if i=len(s) means it is last letter so there is no s[i+1]\n                        s[i]=c\n                        break\n                    if (i>0 and i<len(s)-1) and s[i-1]!=c and s[i+1]!=c: \n                        s[i]=c\n                        break\n        return \'\'.join(s)\n\t```
['Python', 'Python3']