Graph Coloring Problem In Python