An integer N (1 ≤ N ≤ 500000), representing some quantity or size.
A string S of length N, consisting of lowercase English letters.
An integer Q (1 ≤ Q ≤ 20000), representing some number of queries.
A list of Q queries, where each query is one of the following two types:
1. "1 i_q c_q" - where i_q (1 ≤ i_q ≤ N) is an integer and c_q is a lowercase English letter.
2. "2 l_q r_q" - where l_q and r_q (1 ≤ l_q ≤ r_q ≤ N) are integers.

### Example Input:

```
7
abcdbbd
6
2 3 6
1 5 z
2 1 1
1 4 a
1 7 d
2 1 7
```

### Function Signature:
Write a function f(N, S, Q, queries) that takes in the input.
def f(N: int, S: str, Q: int, queries: List[str]): 
    ''' 
    N: an integer
    S: a string
    Q: an integer
    queries: a list of strings
    '''