import std.stdio, std.conv, std.functional, std.string;
import std.algorithm, std.array, std.container, std.range, std.typecons;
import std.numeric, std.math, std.random;
import core.bitop;

string FMT_F = "%.10f";

static string[] s_rd;
T RD(T = long)() { while(!s_rd.length) s_rd = readln.chomp.split; string res = s_rd[0]; s_rd.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }
T[] ARR(T = long)(in string str, T fix = 0) { auto r = str.split.to!(T[]); r[] += fix; return r; }
T[] RDA(T = long)(T fix = 0) { auto r = readln.chomp.split.to!(T[]); r[] += fix; return r; }
T[][] RDA2(T = long)(size_t n, T[] fix = []) { auto r = new T[][](n); foreach (i; 0..n) { r[i] = readln.chomp.split.to!(T[]); foreach (j, e; fix) r[i][j] += e; } return r; }
size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

bool inside(T)(T x, T b, T e) { return x >= b && x < e; }
long lcm(long x, long y) { return x * y / gcd(x, y); }

long mod = 10^^9 + 7;
//long mod = 998244353;
//long mod = 1_000_003;
void moda(ref long x, long y) { x = (x + y) % mod; }
void mods(ref long x, long y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(ref long x, long y) { x = (x * y) % mod; }

void main()
{
	auto N = RD;
	auto M = RD;
	auto edges = new bool[long][](N);
	bool[long] used;
	foreach (i; 0..M)
	{
		auto A = RD-1;
		auto B = RD-1;
		edges[A][B] = true;
		edges[B][A] = true;
		used[A*(10^^6)+B] = false;
		used[B*(10^^6)+A] = false;
	}

	debug writeln(used);

	if (M % 2 == 1)
		writeln(-1);
	else
	{
		long[2][] ans;
		auto cnt = new long[](N);
		auto data = new long[2][](N*2);
		auto heap = BinaryHeap!(long[2][], (long[2] a, long[2] b) => a[0] > b[0])(data, 0);
		foreach (i, e; edges)
		{
			heap.insert([e.keys.length, i]);
		}
		/*auto index = MAKE_IDX!((long[] a, long[] b) => a.length < b.length)(edges);
		foreach (i; index)*/
		while (!heap.empty)
		{
			auto n = heap.removeAny;
			auto i = n[1];
			long c = edges[i].keys.length;
			/*foreach (e; edges[i])
				if (!used[i*(10^^6)+e]) ++c;*/

			if ((c + cnt[i]) % 2 == 1)
			{
				foreach (j, key; edges[i].keys)
				{
					//if (used[i*(10^^6)+e]) continue;

					debug writeln("a node:", i);
					ans ~= [key, i];
					//used[i*(10^^6)+e] = true;
					//used[e*(10^^6)+i] = true;
					++cnt[key];
					edges[i].remove(key);
					edges[key].remove(i);
					heap.insert([edges[key].keys.length, key]);
					break;
				}
			}
			long[2][] dList;
			foreach (j, key; edges[i].keys)
			{
				//if (used[i*(10^^6)+e]) continue;

				debug writeln("b node:", i);
				ans ~= [i, key];
				//used[i*(10^^6)+e] = true;
				//used[e*(10^^6)+i] = true;
				++cnt[i];
				dList ~= [i, key];
				dList ~= [key, i];
			}
			foreach (e; dList)
			{
				edges[e[0]].remove(e[1]);
				heap.insert([edges[e[1]].keys.length, e[1]]);
			}
		}
		foreach (e; ans)
		{
			writeln(e[0]+1, " ", e[1]+1);
		}
	}
	
	stdout.flush();
	debug readln();
}