using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoder_Grand_Contest_035
{
    class Program_B
    {
        static Node[] aa;

        class Node
        {
            public int node;
            public List<int> linkNodes = new List<int>();

            public void solve()
            {
                int[] s = new int[linkNodes.Count];
                linkNodes.CopyTo(s);
                while (linkNodes.Count >= 2)
                {
                    var n1 = linkNodes.ElementAt(0);
                    var n2 = linkNodes.ElementAt(1);

                    Console.WriteLine(string.Format("{0} {1}", node, n1));
                    Console.WriteLine(string.Format("{0} {1}", node, n2));

                    linkNodes.RemoveRange(0, 2);
                    aa[n1].linkNodes.Remove(node);
                    aa[n2].linkNodes.Remove(node);
                }

                foreach (var n in s)
                    aa[n].solve();
            }
        }
        static void Main(string[] args)
        {

            var N = 0;
            var M = 0;
            {
                var input = Console.ReadLine().Split(' ');
                N = Int32.Parse(input[0]);
                M = Int32.Parse(input[1]);
            }

            //var a = new List<Node>();
            aa = new Node[N+1];
            for (int n = 0; n <= N; n++)
            {
                var node = new Node() { node = n};
                //a.Add(node);
                aa[n] = node;
            }

            for (int m = 0; m < M; m++)
            {
                var input = Console.ReadLine().Split(' ');
                var n1 = Int32.Parse(input[0]);
                var n2 = Int32.Parse(input[1]);
                aa[n1].linkNodes.Add(n2);
                aa[n2].linkNodes.Add(n1);
            }

            if (M % 2 != 0)
            {

                Console.WriteLine("-1");
                return;
            }

            aa[1].solve();
        }
    }
}
