using System;
using System.Linq;//リストの使用
using System.Collections.Generic;
using System.Text;//テキストの高速出力に必要
class Program
{
static string[] input = Console.ReadLine().Split(' ');
static int n = int.Parse(input[0]);
static int m = int.Parse(input[1]);
static List<int>[] nextList = new List<int>[n];
static List<int>[] childrenList = new List<int>[n];
static int[,] selectTreeEdges = new int[m,2];
static int selectTreeEdgesCount = 0;
static bool[] lookedVertexes = new bool[n];//木の逆走を防ぐ
static int[] outDegree = new int[n];
static List<int> eulerTourList = new List<int>();
static int[] depths = new int[n];//木の深さ

	static void Main()
	{
  
  if(m % 2 == 0)
  {
    for(int i = 0; i < n; i++)
    {
      nextList[i] = new List<int>();
      childrenList[i] = new List<int>();
    }
    int[,] edges = new int[m,2];

    for(int i = 0; i < m; i++)
    {
      int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '),int.Parse);
      nextList[nums[0]-1].Add(nums[1]-1);
      nextList[nums[1]-1].Add(nums[0]-1);
      edges[i,0] = nums[0]-1;
      edges[i,1] = nums[1]-1;
    }

    SelectTreeEdges(0);
    int[,] notSelectEdges = NotSelectEdges(edges, selectTreeEdges);

    int[][] answers = new int[m][];
    int answerCount = 0;
    for(int i = 0; i < m; i++) answers[i] = new int[2];

    for(int i = 0; i < notSelectEdges.GetLength(0); i++)
    {
      outDegree[notSelectEdges[i,0]]++;
      answers[answerCount][0] = notSelectEdges[i,0]+1;
      answers[answerCount][1] = notSelectEdges[i,1]+1;
      answerCount++;
    }

    for(int i = 0; i < n; i++)
    {
      lookedVertexes[i] = false;
      nextList[i].Clear();
    }
    for(int i = 0; i < n-1; i++)
    {
      nextList[selectTreeEdges[i,0]].Add(selectTreeEdges[i,1]);
      nextList[selectTreeEdges[i,1]].Add(selectTreeEdges[i,0]);
    }
    
    MakeEulerTour(0);
    for(int i = 0; i < n; i++) lookedVertexes[i] = false;
    MakeChildrenList(0);
    SearchDepths(0,0);
    
    for(int i = 1; i < eulerTourList.Count(); i++)
    {
      if(depths[eulerTourList[i-1]] > depths[eulerTourList[i]])
      {
        if(outDegree[eulerTourList[i-1]] % 2 == 1)
        {
          answers[answerCount][0] = eulerTourList[i-1]+1;
          answers[answerCount][1] = eulerTourList[i]+1;
          answerCount++;
        }else
        {
          answers[answerCount][0] = eulerTourList[i]+1;
          answers[answerCount][1] = eulerTourList[i-1]+1;
          answerCount++;
          outDegree[eulerTourList[i]]++;
        }
      }
    }
    
    var answerText = new StringBuilder();
    for(long i = 0; i < answers.Length; i++)
    {
      answerText.AppendLine(string.Join(" ", answers[i]));
    }
    Console.Write(answerText);
    
  }else
  {
    Console.WriteLine(-1);
  }
    
	}

  static void SelectTreeEdges(int rootVertex)
  {//連結グラフのnextListから、0-indexで根をrootVertexとする木の辺をO(頂点数)で1つ返す
    selectTreeEdgesCount = 0;
    for(int i = 0; i < n; i++) lookedVertexes[i] = false;
    for(int i = 0; i < m; i++)
    {
      selectTreeEdges[i,0] = -1;
      selectTreeEdges[i,1] = -1;
    }
    SelectTreeEdgesSub(rootVertex);
  }

  static void SelectTreeEdgesSub(int rootVertex)
  {
    lookedVertexes[rootVertex] = true;
    for(int i = 0; i < nextList[rootVertex].Count(); i++)
    {
      if(!lookedVertexes[nextList[rootVertex][i]])
      {
        selectTreeEdges[selectTreeEdgesCount,0] = rootVertex;
        selectTreeEdges[selectTreeEdgesCount,1] = nextList[rootVertex][i];
        selectTreeEdgesCount++;   
        SelectTreeEdgesSub(nextList[rootVertex][i]);
      }
    }
  }

  static void MakeEulerTour(int vertexNum)
  {//0-indexで根の頂点番号から始めて、木のオイラーツアーをO(頂点数)で生成
    eulerTourList.Clear();

    for(int i = 0; i < n; i++)
    {
      lookedVertexes[i] = false;
    }
    
    EulerTour(vertexNum);
  }

  static void EulerTour(int vertexNum)
  {
    eulerTourList.Add(vertexNum);
    lookedVertexes[vertexNum] = true;//木の逆走を防ぐ
    
    for(int i = 0; i < nextList[vertexNum].Count(); i++)
    {
      if(!lookedVertexes[nextList[vertexNum][i]])//木の逆走を防ぐ
      {
        EulerTour(nextList[vertexNum][i]);
        eulerTourList.Add(vertexNum);
      }
    }
  }

  static int[,] NotSelectEdges(int[,] edges, int[,] removes)
  {//edgesからremovesを除いた辺をO(辺数)で返す
    int x = edges.GetLength(0);
    int y = 0;
    for(int i = 0; i < x; i++)
    {
      if(removes[i,0] != -1) y++;
    }
    int[,] answers = new int[x-y,2];
    int[][] edgesSub = new int[x][];
    int[][] removesSub = new int[y][];
    for(int i = 0; i < x; i++)
    {
      edgesSub[i] = new int[2];
      edgesSub[i][0] = edges[i,0];
      edgesSub[i][1] = edges[i,1];
    }
    for(int i = 0; i < y; i++)
    {
      removesSub[i] = new int[2];
      removesSub[i][0] = removes[i,0];
      removesSub[i][1] = removes[i,1];
    }
    
    for(int i = 0; i < x; i++)
    {
      //Console.WriteLine(edgesSub[i][0] +" "+ edgesSub[i][1]+"in");
      if(edgesSub[i][0] > edgesSub[i][1])
      {
        int swapMemo = edgesSub[i][0];
        edgesSub[i][0] = edgesSub[i][1];
        edgesSub[i][1] = swapMemo;
      }
    }
    for(int i = 0; i < y; i++)
    {
      if(removesSub[i][0] > removesSub[i][1])
      {
        int swapMemo = removesSub[i][0];
        removesSub[i][0] = removesSub[i][1];
        removesSub[i][1] = swapMemo;
      }
    }

    var sorted = edgesSub.OrderBy(a => a[0]).ThenBy(a => a[1]).ToList();
    var sortedSub = removesSub.OrderBy(a => a[0]).ThenBy(a => a[1]).ToList();

    int edgeMemo = 0;
    int addMemo = 0;
    for(int i = 0; i < x; i++)
    {
      while((sorted[i][0] > sortedSub[edgeMemo][0])
        || (sorted[i][0] == sortedSub[edgeMemo][0] && sorted[i][1] > sortedSub[edgeMemo][1]))
      {
        if(edgeMemo == y-1) break;
        else edgeMemo++;
      }
      if(sorted[i][0] != sortedSub[edgeMemo][0] || sorted[i][1] != sortedSub[edgeMemo][1])
      {
        answers[addMemo,0] = sorted[i][0];
        answers[addMemo,1] = sorted[i][1];
        addMemo++;
      }
    }

    return answers;
  }

  static void MakeChildrenList(int rootNum)
  {//nextListからchildrenListを、引数を0-indexの根の番号としてO(頂点数)で作る
    lookedVertexes[rootNum] = true;//木の逆走を防ぐ
    for(int i = 0; i < nextList[rootNum].Count(); i++)
    {
      if(!lookedVertexes[nextList[rootNum][i]])
      {
        childrenList[rootNum].Add(nextList[rootNum][i]);
        MakeChildrenList(nextList[rootNum][i]);
      }
    }
  }

  static void SearchDepths(int vertexNum, int depth)
  {//頂点数nとchildrenListから、引数の頂点の深さ及び、その子の深さをO(頂点数)で設定
    depths[vertexNum] = depth;//深さを設定

    for(int i = 0; i < childrenList[vertexNum].Count; i++)
    {
      SearchDepths(childrenList[vertexNum][i],depth+1);//子の深さを設定
    }
  }

}

Measured memory_bytes: 64520