Integer N (1 ≤ N ≤ 1000), representing some quantity or size.
N tuples, each containing three integers (X1, Y1, Z1), where 0 ≤ X1, Y1 ≤ 10^9 and 1 ≤ Z1 ≤ 10.
N tuples, each containing three integers (X2, Y2, Z2), where 0 ≤ X2, Y2 ≤ 10^9 and 1 ≤ Z2 ≤ 10.

### Example Input:

```
2
0 0 1
3 2 1
2 2 1
5 0 1
```

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