An integer N (1 ≤ N ≤ 3 * 10^5), representing some quantity or size.
A list of N integers, where each integer is between 0 and 10^9.
N-1 pairs of integers, each pair representing a connection between two entities, where each integer in the pair is between 1 and N.

### Example Input:

```
3
1 2 3
1 2
1 3
```

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