Graph has __toString and negative weight is not allowed