// B - Even Degrees
#include <bits/stdc++.h>

using namespace std;

vector<vector<int> > g;
vector<int> deg, dep;
vector<pair<int, int> > ans;

void dfs(int u, int par)
{
	for (int i = 0; i < g[u].size(); i++) {
		int v = g[u][i];
		if (dep[v] < 0) {
			dep[v] = dep[u] + 1;
			dfs(v, u);
		} else {
			if (dep[v] > dep[u]) {
				ans.push_back(make_pair(u, v));
				deg[u]++;
			}
		}
	}
	if (deg[u] % 2 == 1) {
		ans.push_back(make_pair(u, par));
		deg[u]++;
	} else if (par >= 0) {
		ans.push_back(make_pair(par, u));
		deg[par]++;
	}
}

int main(int argc, char *argv[])
{
	ios::sync_with_stdio(false); cin.tie(0);

	int n, m;
	cin >> n >> m;
	g.resize(n);
	for (int i = 0; i < m; i++) {
		int u, v;
		cin >> u >> v;
		u--; v--;
		g[u].push_back(v);
		g[v].push_back(u);
	}

	if (m % 2) {
		cout << -1 << '\n';
	} else {
		deg.assign(n, 0);
		dep.assign(n, -1);
		dep[0] = 0;
		dfs(0, -1);
		for (int i = 0; i < ans.size(); i++)
			cout << ans[i].first + 1 << ' ' << ans[i].second + 1 << '\n';
	}

	return 0;
}
