An integer n (1 ≤ n ≤ 100,000), representing some quantity or size.
A list of n tuples, where each tuple consists of a character from the set {'S', 'H', 'C', 'D'} and an integer (1 ≤ integer ≤ 10^9).

### Example Input:

```
6
D 3
H 2
D 1
S 3
D 2
C 1
```

### Function Signature:
Write a function f(n, cards) that takes in the input.
```python
def f(n: int, cards: List[Tuple[str, int]]):
    '''
    n: an integer
    cards: a list of tuples, where each tuple contains a character and an integer
    '''
```