Python Replace String Between Two Strings Codeforces Rating