Types: N: int, S: str, Q: int, Query: List[Tuple[int, Union[Tuple[int, str], Tuple[int, int]]]]
Ranges: 1 ≤ N ≤ 500000, 1 ≤ Q ≤ 20000, 1 ≤ i_q ≤ N, 1 ≤ l_q ≤ r_q ≤ N
Addtl Info: c_q is a lowercase English letter, S is a string consisting of lowercase English letters, |S| = N, There is at least one query of type 2 in each testcase.