An integer N (2 ≤ N ≤ 10^5), representing some quantity or size.
An integer M (N-1 ≤ M ≤ N), representing some quantity or size.
A list of M tuples where each tuple consists of two integers a_i and b_i (1 ≤ a_i, b_i ≤ N).

### Example Input:

```
6 5
1 2
1 3
1 4
2 5
2 6
```

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