#include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>
#include<sstream>
#include<complex>
#include<iomanip>
#include<numeric>
#include<cassert>
#define X first
#define Y second
#define pb push_back
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define rreps(X,S,Y) for (int (X) = (Y)-1;(X) >= (S);--(X))
#define repe(X,Y) for ((X) = 0;(X) < (Y);++(X))
#define peat(X,Y) for (;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define Endl endl
#define NL <<"\n"

using namespace std;
using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
template<class T> using vv=vector<vector<T>>;
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
//#undef NUIP
#ifdef NUIP
#include "../benri.h"
#else
#define out
#endif
#ifdef __cpp_init_captures
template<typename T>vector<T> table(int n, T v){ return vector<T>(n, v);}
template <class... Args> auto table(int n, Args... args){auto val = table(args...); return vector<decltype(val)>(n, move(val));}
#endif
const ll MOD=1e9+7; //998244353

struct UF{
  vector<int> data;
  UF(int size):data(size,-1){}
  bool unite(int x,int y){
    x=root(x); y=root(y);
    if(x!=y){
      if(-data[y]>-data[x]) swap(x,y);
      data[x]+=data[y]; data[y]=x;
    }
    return x!=y;
  }
  bool findSet(int x,int y){return root(x)==root(y);}
  int root(int x){return data[x]<0?x:data[x]=root(data[x]);}
  int size(int x) {return -data[root(x)];}
};

int main(){
  ios_base::sync_with_stdio(false); cin.tie(0);
  cout<<fixed<<setprecision(0);
	int n,m;
	cin>>n>>m;
	vv<int> g(n);
	rep(i,m){
		int a,b;
		cin>>a>>b; --a; --b;
		g[a].pb(b);
		g[b].pb(a);
	}
	if(m%2){
		cout<<-1<<endl;
		return 0;
	}
	vector<int> usd(n),ins(n);
	vector<pii> re;
	function<int(int,int)> dfs=
		[&](int v,int p){
			usd[v]=ins[v]=1;
			vector<int> vs;
			for(int w:g[v]){
				if(w==p) continue;
				if(ins[w]){
					vs.pb(w);
				}else if(!usd[w]){
					if(dfs(w,v)) vs.pb(w);
				}
			}
			int ret=1;
			if(vs.size()%2){
				vs.pb(p);
				ret=0;
			}
			for(int w:vs) re.eb(v,w);
			out(v,vs,1);
			ins[v]=0;
			return ret;
		};
	dfs(0,-1);
	for(auto p:re) cout<<p.X+1<<" "<<p.Y+1<<endl;
	// int n=8;
	// vector<pii> es;
	// rep(i,n)rep(j,i) es.eb(j,i);
	// int m=es.size();
	// out(n,m,1);
	// rep(i,1<<m)if(__builtin_popcount(i)%2==0){
	// 	UF uf(n);
	// 	rep(j,m)if(i>>j&1) uf.unite(es[j].X,es[j].Y);
	// 	if(uf.size(0)==n){
	// 		int ok=0;
	// 		for(int ii=i;;ii=(ii-1)&i){
	// 			int st=0;
	// 			rep(j,m)if(i>>j&1){
	// 				if(ii>>j&1) st^=1<<es[j].X;
	// 				else st^=1<<es[j].Y;
	// 			}
	// 			if(st==0){ ok=1; break;}
	// 			if(ii==0) break;
	// 		}
	// 		if(!ok){
	// 			rep(j,m)if(i>>j&1) cout<<es[j].X<<" "<<es[j].Y<<endl;
	// 			cout<<endl;
	// 			return 0;
	// 		}
	// 	}
	// }
  return 0;
}


Measured memory_bytes: 19572