Given an unweighted graph with n nodes labeled from 0 to n - 1, an edge list edges, and a source node src, return an array dist where dist[i] is the length of the shortest path from src to node i. If a node is unreachable, return -1 for that node. The graph is undirected.
def shortest_paths_unweighted(n, edges, src):