An integer N (1 ≤ N ≤ 500), representing some quantity or size.
An integer M (0 ≤ M ≤ 3,000), representing another quantity or size.
A list of M tuples, where each tuple consists of two integers (s_i, t_i) (1 ≤ s_i, t_i ≤ N).

### Example Input:

```
9
13
1 2
1 3
2 9
3 4
3 5
3 6
4 9
5 7
6 7
6 8
7 9
8 9
9 1
```

### 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 containing two integers
    '''