An integer N (1 ≤ N ≤ 15), representing some quantity or size.
A list of tuples where each tuple consists of two integers. The first integer \(q\) (1 ≤ q ≤ 3), representing a type of operation, and the second integer \(x\) (1 ≤ x ≤ 10), representing a value associated with the operation.

### Example Input:

```
3
1 2
2 10
3 8
```

### Function Signature:
Write a function f(N, queries) that takes in the input.
```python
def f(N: int, queries: List[Tuple[int, int]]):
    '''
    N: an integer
    queries: a list of tuples where each tuple consists of two integers
    '''
```