def InputStartingPoint(G):
    """Returns the starting vertex based on the user input. 
    
    Parameters
    ----------
    G : NetworkX graph
    
    Returns
    -------
    The starting vertex selected by the user.
    """
     
    vertices = G.nodes
    print(vertices)
    vertex = input('Please enter a vertex listed for the graph: ')
    while not vertex.isnumeric() or int(vertex) not in vertices:
        print(vertices)
        vertex = input('Invalid entry. Please enter a valid vertex listed for the graph: ')
    return int(vertex)