An integer n (1 ≤ n ≤ 1,000,000), representing some quantity or size.
A list of integers a of size n, where each integer is between 0 and 120.
The input ends with a single zero.

### Example Input:

```
8
71
34
65
11
41
39
6
5
0
```

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