This is an implementation of the Greedy algorithm for coloring graphs but with a little twist. Given a graph A and an integer p, this algorithm colors the graph with the Greedy approach until it has colored p nodes. Then, it chooses the next node to color in a dynamic way considering the already colored nodes.