Longest Repeating Substring With Replacement Probability