An integer N (2 ≤ N ≤ 10), representing some quantity or size.
An integer M (1 ≤ M ≤ 10), representing some quantity or size.
An integer Q (1 ≤ Q ≤ 50), representing some quantity or size.
Q quadruples of integers (a, b, c, d), where:
  - 1 ≤ a < b ≤ N
  - 0 ≤ c ≤ M - 1
  - 1 ≤ d ≤ 10^5

### Example Input:

```
3 4 3
1 3 3 100
1 2 2 10
2 3 2 10
```

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