added print() function for Vertex and Edge classes