-write method set_contributesto, class graph

-method sets the attributes "contributesto" of every node, by running
through the graph with depth-first-search.
-start with the class graph..