#include<bits/stdc++.h>
using namespace std;

const int N = 1000 * 100 + 100;
int n, m, deg[N], digi[N], h[N];
vector<int> adj[N];
bool vis[N];

void dfs(int root) {
	int v = root;
	vis[root] = true;
	for (auto u: adj[root]) 
		if (!vis[u]) {
			h[u] = h[root] + 1;
			dfs(u);
			if (deg[u] & 1)
				cout << u << ' ' << v << endl, deg[u]++;
			else
				cout << v << ' ' << u << endl, deg[v]++;
		}
		else if (h[root] < h[u]) {
			if (deg[u] & 1)
				cout << u << ' ' << v << endl, deg[u]++;
			else
				cout << v << ' ' << u << endl, deg[root]++;
		}
}

int main() { 
	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cin >> n >> m;
	for (int i = 1, v, u; i <= m; i++) {
		cin >> v >> u;
		adj[v].push_back(u);
		adj[u].push_back(v);
		digi[v]++, digi[u]++;
	}
	int root = 1;
	for (int i = 1; i <= n; i++)
		if (digi[i] > digi[root])
			root = i;
	if (m & 1)
		return cout << -1 << endl, 0;
	dfs(root);
	return 0;
}
