Canonicalized Input Description:

An integer N (1 ≤ N ≤ 2×10^5), representing some quantity or size.
An integer M (1 ≤ M ≤ 2×10^5), representing some quantity or size.
A list of N tuples (L_i, R_i), where each tuple consists of two integers 0 ≤ L_i < R_i ≤ M + 1.

### Example Input:

```
4 4
0 3
2 3
1 3
3 4
```

### Function Signature:
Write a function f(inputs) that takes in the input.
def f(inputs: List[Tuple[int, int, List[Tuple[int, int]]]]):
    '''
    inputs: a list of tuples, each containing an integer, an integer, and a list of tuples of integers
    '''