Types: N: int, M: int, a: List[int], b: List[int]

Ranges: 3 ≤ N ≤ 500, max(3, N-1) ≤ M ≤ 30000, 1 ≤ a_i, b_i ≤ N

Addtl Info: The graph is connected when ignoring the direction of edges, a_i ≠ b_i for all i, {a_i, b_i} ≠ {a_j, b_j} for all i ≠ j