Simple Python solution
Idea:\nFor every ? in the string, recplace it with either a, b, or c, as there are only two sides for \neach letter therefor there is no need for other letters 
**Idea:**\nFor every `?` in the string, recplace it with either `a, b, or c`, as there are only two sides for \neach letter therefor there is no need for other letters in the alphabet to recplace it in order to receive a valid string.\n(The spaces added to the beginning and end of the string are in order to skip checking\nevery iteration` if i>0 and i<n.`)\n\n**Time Complexity:** O(n) (where n is the length of the string.)\nWe iterate over every char in the string 4 times:\n- list(s)\n- in the for loop.\n- string[1:n+1] \n-  join\n\n**Space Complexity:** O(n) - (for storing `string`)\n\n```\ndef modifyString(self, s: str) -> str:\n        string=[" "]+list(s)+[" "]\n        n=len(s)\n        \n        for i in range(1,n+1): \n            if string[i]!="?":\n                continue\n            for letter in "abc":\n                if letter!=string[i-1] and letter!=string[i+1]:\n                    string[i]=letter\n                    break\n                    \n        return "".join(string[1:n+1])\n```\n\n*Thanx for reading, please **upvote** if it helped you  :)*
['Python3']