An integer N (1 ≤ N ≤ 10^5), representing some quantity.
A list of integers A of size 3N, where each integer is between 1 and 10^9.

### Example Input:
```
2
5 2 8 5 1 5
```

### Function Signature:
Write a function f(N, A) that takes in the input. 
```python
def f(N: int, A: List[int]):
    ''' 
    N: an integer 
    A: a list of integers
    '''
```