#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
vector<int> e[N];
int vis[N],d[N];
map< pair<int,int>,int > mp;
pair<int,int> mk(int x,int y){
	if(x>y) swap(x,y);
	return make_pair(x,y);
}
void dfs(int x,int fath){
	vis[x]=1; 
//	cout<<x<<endl;
	for(int i=0;i<e[x].size();++i){
		int v=e[x][i];
		if(v==fath) continue;
		if(vis[v]){
			if(mp.count(mk(x,v))) continue;
			mp[mk(x,v)]=1;
			if(d[v]&1)  ++d[v],cout<<v<<" "<<x<<endl;
			else ++d[x],cout<<x<<" "<<v<<endl;
			continue;
		}
		dfs(v,x);
		if(mp.count(mk(x,v))) continue;
		mp[mk(x,v)]=1;
		if(d[v]&1) cout<<v<<" "<<x<<endl,++d[v];
		else cout<<x<<" "<<v<<endl,++d[x];
	}
}
signed main(){
	int n,m,u,v;
	cin>>n>>m;
	if(m&1) return puts("-1"),0;
	for(int i=1;i<=m;++i){
		cin>>u>>v;
		e[u].push_back(v);
		e[v].push_back(u);
	}
	dfs(1,0);
	return 0;
}