Given number of nodes and set of edges connecting some vertices of an undirected graph, compute and output the bfs traversal of that graph.