An integer q (1 ≤ q ≤ 200,000), representing some quantity or number of operations.
A list of operations, each operation is either one of:
- Tuple (0, x) where 0 ≤ x ≤ 1,000,000,000
- Tuple (1, x) where 0 ≤ x ≤ 1,000,000,000
- Tuple (2, x) where 0 ≤ x ≤ 1,000,000,000
- Tuple (3, L, R) where 0 ≤ L ≤ R ≤ 1,000,000,000

### Example Input:
```
9
0 1
0 2
0 3
2 2
1 1
1 2
1 3
0 4
3 2 4
```

### Function Signature:
Write a function f(q, operations) that takes in the input.
```python
def f(q: int, operations: List[Tuple[int, ...]]):
    ''' 
    q: an integer 
    operations: a list of tuples 
    '''
```