disallow parallel edges and self-loops
read graph from file and print it