def interval_replace(s, old, new_odd, new_even):
    """ e.g. s=''hello','world'', old='\'', new_odd='`', new_even='\''
            result='`hello',`world''
    """
    need_replace = True
    replaced_str = ''
    for i in s:
        if i == old:
            if need_replace:
                replaced_str += new_odd
            else:
                replaced_str += new_even
            need_replace = not need_replace
        else:
            replaced_str += i
    return replaced_str