An integer N (1 ≤ N ≤ 2×10^5), representing some quantity or size.
A list of integers P of size N, where each integer is between 1 and N, and all integers are distinct.

### Example Input:

```
4
1
3
2
4
```

### Function Signature:
Write a function f(N, P) that takes in the input.

```python
def f(N: int, P: List[int]):
    '''
    N: an integer
    P: a list of integers
    '''
```