An integer M (1 ≤ M ≤ 100), representing some quantity.
An integer N (1 ≤ N ≤ 100), representing some quantity.
A list of M non-negative integers, each between 0 and 100, representing some delays.
For each of the N blocks, an integer L, representing some quantity.
For each of the L lines within each block, an integer P (0 ≤ P < M), an integer T (0 ≤ T < 19999), and a string A (length 1 to 9).

### Example Input:

```
3 2
1 2 10
3
0 3420 o
1 4589 o
2 4638 x
3
1 6577 SUZUMIYA
2 7644 SUZUMIYA
0 19979 YASUZUMI
0 0
```

### Function Signature:
Write a function f(inputs) that takes in the input.
```python
def f(inputs: List[Tuple[int, int, List[int], List[Tuple[int, List[Tuple[int, int, str]]]]]]):
    '''
    inputs: a list of tuples, where each tuple contains:
        - an integer M
        - an integer N
        - a list of M non-negative integers
        - a list of N tuples, each containing:
            - an integer L
            - a list of L tuples, each containing:
                - an integer P
                - an integer T
                - a string A
    '''
```