An integer N (2 ≤ N ≤ 100), representing some quantity or size.
An integer M (1 ≤ M ≤ 100), representing another quantity or size.
An integer L (0 ≤ L ≤ N - 2), representing another quantity or size.
An integer K, representing another quantity or size.
An integer A (0 ≤ A < N), representing another quantity or size.
An integer H (0 ≤ H < N), representing another quantity or size.
A list of L integers, each integer in the range [0, N-1].
A list of K tuples, each tuple containing three integers (X, Y, T) where 0 ≤ X, Y < N and T is a non-negative integer.

### Example Input:

```
2 1 0 1 0 1
0 1 2
3 1 1 2 0 1
2
0 2 1
1 2 1
3 2 1 2 0 1
2
0 2 1
1 2 1
4 4 1 4 1 3
2
0 1 2
1 2 4
0 2 1
3 0 3
5 3 2 6 0 3
1 2
2 1 2
1 0 1
3 4 1
2 4 1
4 1 2
2 0 2
5 4 2 6 0 3
1 2
4 2 4
2 1 2
4 3 1
0 1 5
1 4 2
2 0 3
0 0 0 0 0 0
```

### Function Signature:
Write a function f(inputs) that takes in the input.
def f(inputs: List[Tuple[int, int, int, int, int, int, List[int], List[Tuple[int, int, int]]]]):
    '''
    inputs: a list of tuples, each tuple containing:
        - an integer N
        - an integer M
        - an integer L
        - an integer K
        - an integer A
        - an integer H
        - a list of L integers
        - a list of K tuples, each tuple containing three integers (X, Y, T)
    '''