An integer N (2 ≤ N ≤ 100000), representing some quantity or size.
An integer C (1 ≤ C ≤ 100000), representing some number of commands.
C lines, where each line is either:
- "0 t p" where t is an integer (1 ≤ t ≤ N) and p is an integer (1 ≤ p ≤ 10^9)
- "1 m" where m is an integer (1 ≤ m ≤ N)

### Example Input:

```
3 11
0 2 5
0 1 5
0 3 4
1 1
1 2
1 3
0 3 2
1 1
0 2 1
1 2
1 3
```

### Function Signature:
Write a function f(N, C, commands) that takes in the input.
```python
def f(N: int, C: int, commands: List[str]):
    '''
    N: an integer
    C: an integer
    commands: a list of strings
    '''
```