An integer n (1 ≤ n ≤ 100,000), representing some quantity or size.  
A list of tuples (X, Y) of size n, where X is a character from the set {'S', 'H', 'C', 'D'} and Y is an integer (1 ≤ Y ≤ 1e9).

### 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
    '''
```