Python Replace String Between Two Strings Codeforces Sheet 6