comefrom: <doocs>1576.Replace All 's to Avoid Consecutive Repeating Characters_1.py
code: def modifyString( s: str) -> str:
      ans = list(s)
      for i, c in enumerate(ans):
          if c == '?':
              for cc in 'abc':
                  if i > 0 and ans[i - 1] == cc:
                      continue
                  if i < len(s) - 1 and ans[i + 1] == cc:
                      continue
                  ans[i] = cc
                  break
      return ''.join(ans)
masked: def sample_funcname ( var_0 : str ) -> str :
      var_3 = list ( var_0 )
      for var_5 , var_6 in enumerate ( var_3 ) :
          if var_6 == '?' :
              for var_9 in 'abc' :
                  if var_5 > 0 and var_3 [ var_5 - 1 ] == var_9 :
                      continue
                  if var_5 < len ( var_0 ) - 1 and var_3 [ var_5 + 1 ] == var_9 :
                      continue
                  var_3 [ var_5 ] = var_9
                  break
      return ''.join ( var_3 )
  