An integer n (1 ≤ n ≤ 200,000), representing some quantity or size.
A list of integers a of size n, where each integer is between 0 and 10^9 and the list is in ascending order with no duplicates.
An integer m (1 ≤ m ≤ 200,000), representing some quantity or size.
A list of integers b of size m, where each integer is between 0 and 10^9 and the list is in ascending order with no duplicates.

### Example Input:

```
5
1 2 3 5 8
2
2 5
```

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