An integer N (2 ≤ N ≤ 1,000), representing some quantity or size.
A list of N values where each value is either an integer between -10^9 and 10^9 or a character 'x'.
The end of input is indicated by a single 0, which is not included in the datasets.
You may assume that the number of the datasets does not exceed 100.

### Example Input:

```
5
1 x 2 4 x
2
x x
2
1 2
2
2 1
2
1000000000 x
4
x 2 1 x
0
```

### Function Signature:
Write a function f(inputs) that takes in the input. 
def f(inputs: List[Tuple[int, List[Union[int, str]]]]): 
    ''' 
    inputs: a list of tuples, each containing an integer and a list of integers/strings
    '''