As you could implement the idea of the following program with graphs in python, there are codes in it, but I have no idea how to implement it link