An integer NA (1 ≤ NA ≤ 10^4), representing some quantity or size.
A list of card strings of length NA, where each card string consists of one character from {'S', 'H', 'D', 'C'} followed by one character from {'A', 'K', 'Q', 'J', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}.
An integer NB (1 ≤ NB ≤ 10^4), representing some quantity or size.
A list of card strings of length NB, where each card string consists of one character from {'S', 'H', 'D', 'C'} followed by one character from {'A', 'K', 'Q', 'J', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}.
The input ends with a single line containing a zero.

### Example Input:

```
1
SA
1
C2
2
SA HA
2
C2 C3
5
S3 S5 S8 S9 S2
3
H7 H3 H4
10
H7 CJ C5 CA C6 S2 D8 DA S6 HK
10
C2 D6 D4 H5 DJ CX S8 S9 D3 D5
0
```

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