Add graph toString method