    
An integer N (1 ≤ N ≤ 100), representing some quantity or size.
An integer W (1 ≤ W ≤ 10,000), representing some capacity or limit.
N lines each containing three integers v, w, and m, where 1 ≤ v ≤ 1,000, 1 ≤ w ≤ 1,000, and 1 ≤ m ≤ 10,000.

### Example Input:

```
4 8
4 3 2
2 1 1
1 2 4
3 2 2
```

### Function Signature:
Write a function f(N, W, items) that takes in the input.
def f(N: int, W: int, items: List[Tuple[int, int, int]]):
    '''
    N: an integer
    W: an integer
    items: a list of N tuples, where each tuple contains three integers
    '''