Added method toString to Graph Class