Added print() function to Graph