output_description: If it is impossible to assign directions to satisfy the requirement, print
  -1. Otherwise, print an assignment of directions that satisfies the
  requirement, in the following format:
  
      
      
      C_1 D_1
      :
      C_M D_M
      
  
  Here each pair (C_i, D_i) means that there is an edge directed from Vertex C_i
  to Vertex D_i. The edges may be printed in any order.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      A_1 B_1
      :
      A_M B_M
attempt: class Bridge:
      def __init__(self, nodeA, nodeB):
          self.edges = [nodeA, nodeB]
  
      def another(self, node):
          return self.edges[1 if node == self.edges[0] else 0]
  
  
  class Node:
      def __init__(self, id):
          self.id = id
          self._bridges = []
          self.parent = None
  
      def addEdge(self, bridgeEdge):
          self._bridges.append(bridgeEdge)
  
      def bridges(self):
          return ((self, br.another(self)) for br in self._bridges)
  
      def __repr__(self):
          return str((self.id, None if self.parent is None else self.parent.node.id))
  
  
  N, M = map(int, input().split())
  
  nodes = [Node(i) for i in range(N + 1)]
  bridges = []
  for A, B in (map(int, input().split()) for _ in range(N)):
      bridges.append(Bridge(nodes[A], nodes[B]))
  
problem_description: Statement
  
  You are given a simple connected undirected graph with N vertices and M edges.
  The vertices are numbered 1 to N, and the i-th edge connects Vertex A_i and
  Vertex B_i. Takahashi will assign one of the two possible directions to each
  of the edges in the graph to make a directed graph. Determine if it is
  possible to make a directed graph with an even number of edges going out from
  every vertex. If the answer is yes, construct one such graph.
samples: [{"input": "4 4\n    1 2\n    2 3\n    3 4\n    4 1", "output": "1 2\n    1 4\n    3 2\n    3 4\n    \n\nAfter this assignment of directions, Vertex 1 and 3 will each have two\noutgoing edges, and Vertex 2 and 4 will each have zero outgoing edges.\n\n* * *"}, {"input": "5 5\n    1 2\n    2 3\n    3 4\n    2 5\n    4 5", "output": "-1"}]