An integer \( n \) (1 ≤ \( n \) ≤ 10), representing some quantity or size. 
A list of n tuples, each containing:
- A string (up to 20 alphabets) representing a name.
- Three integers \( w \), \( l \), \( d \) (0 ≤ \( w, l, d \) ≤ 9), representing some quantities.

Multiple sets of inputs are provided. Each set follows the above format, and the input ends when n is 0. The number of data sets will not exceed 50.

### Example Input:

```
4
TeamA 1 0 2
TeamB 1 2 0
TeamC 0 2 1
TeamD 2 0 1
3
TeamE 0 2 0
TeamF 1 0 1
TeamG 1 0 1
0
```

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