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