C#
\npublic string ModifyString(string s) {\n\tvar chars = s.ToArray();\n\n\tfor (var i = 0; i < s.Length; i++) {\n\t\tif (chars[i] != \'?\') continue;\n\n\t\tvar 
```\npublic string ModifyString(string s) {\n\tvar chars = s.ToArray();\n\n\tfor (var i = 0; i < s.Length; i++) {\n\t\tif (chars[i] != \'?\') continue;\n\n\t\tvar left = i > 0 ? chars[i - 1] : (char?)null;\n\t\tvar right = i < s.Length - 1 ? chars[i + 1] : (char?)null;\n\n\t\tif (left != \'a\' && right != \'a\') chars[i] = \'a\';\n\t\telse if (left != \'b\' && right != \'b\') chars[i] = \'b\';\n\t\telse if (left != \'c\' && right != \'c\') chars[i] = \'c\';\n\t}\n\n\treturn new string(chars);\n}\n```
[]