add a function to extract a vertex in the smallest cycle while computing the girth of the graph