#define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include<climits>
#include<fstream>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(),(a).end()
#define EPS (1e-5)
#define bit(n,k) ((n>>k)&1)
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
	ll x, y;
	bool operator<(const H& b) const {
		if (x != b.x) return x < b.x;
		return y < b.y;
	}
	bool operator>(const H & b) const {
		if (x != b.x) return x > b.x;
		return y > b.y;
	}
	bool operator==(const H & b) const { return x == b.x && y == b.y; }
	bool operator!=(const H & b) const { return (*this) != b; }
};
struct P {
	ll pos, cost;
	bool operator<(const P& b) const { return cost < b.cost; }
	bool operator>(const P& b) const { return cost > b.cost; }
};
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
	bool operator<(const E& b) const { return cost < b.cost; }
	bool operator>(const E& b) const { return cost > b.cost; }
};
template<typename T, typename U>
void chmin(T & a, U b) {
	if (a > b) a = b;
}
template<typename T, typename U>
void chmax(T & a, U b) {
	if (a < b) a = b;
}
template<typename T>
T max_0(T a) {
	if (a < 0) return 0;
	return a;
}
template<typename T>
T min_0(T a) {
	if (a > 0) return 0;
	return a;
}
ll read() {
	ll u;
	ll k = scanf("%lld", &u);
	return u;
}
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j % i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
int n, m;
vector<B>e[200000];
//to, id
struct A {
	int from, to;
	bool used;
};
A a[200000];
//辺の情報
int b[200000];
//自由にできる辺の数
bool used[200000];
vector<int>ans[200000];
int num[200000];
signed main() {
	cin >> n >> m;
	priority_queue<P, vector<P>, greater<P>>p;
	for (int i = 0; i < m; i++) {
		cin >> a[i].from >> a[i].to;
		e[a[i].from].push_back(B{ a[i].to,i });
		e[a[i].to].push_back(B{ a[i].from,i });
		b[a[i].from]++; b[a[i].to]++;
	}
	if (m % 2 == 1) {
		cout << -1 << endl;
		return 0;
	}
	for (int i = 1; i <= n; i++) {
		p.push(P{ i,b[i] });
	}
	while (!p.empty()) {
		P t = p.top(); p.pop();
		if (used[t.pos]) continue;
		vector<int>v;
		for (int i = 0; i < e[t.pos].size(); i++) {
			if (!a[e[t.pos][i].cost].used) {
				v.push_back(i);
			}
		}
		int k = 0;
		if (v.size() % 2 != num[t.pos] % 2) {
			k = 1;
		}
		for (int i = 0; i < v.size() - k; i++) {
			a[e[t.pos][v[i]].cost].used = 1;
			b[e[t.pos][v[i]].to]--;
			p.push(P{ e[t.pos][v[i]].to, b[e[t.pos][v[i]].to] });
			ans[t.pos].push_back(e[t.pos][v[i]].to);
		}
		if (k) {
			int r = v.size() - 1;
			a[e[t.pos][v[r]].cost].used = 1;
			b[e[t.pos][v[r]].to]--;
			ans[e[t.pos][v[r]].to].push_back(t.pos); 
			p.push(P{ e[t.pos][v[r]].to, b[e[t.pos][v[r]].to] });
			num[e[t.pos][v[r]].to]++;
		}
		used[t.pos] = 1;
	}
	for (int i = 1; i <= n; i++) {
		for (int j = 0; j < ans[i].size(); j++) {
			cout << i << " " << ans[i][j] << endl;
		}
	}
}

Measured memory_bytes: 26096