def initMyGraph(ctor):
    """Constructs and returns a hard-coded sample graph.
    ctor must be a callable that gets the number of vertices and
    creates a graph with the given number of vertces and with no edges"""
    g = ctor(5)
    g.addEdge(0, 1)
    g.addEdge(1, 0)
    g.addEdge(1, 1)
    g.addEdge(1, 2)
    g.addEdge(4, 0)
    g.addEdge(4, 2)
    return g