#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <tuple>
#include <cstdio>
#include <bitset>
#include <sstream>
#include <iterator>
#include <numeric>
#include <map>
#include <cstring>
#include <set>
#include <functional>
#include <iomanip>

using namespace std;

//#define DEBUG_ //!!提出時にコメントアウト!!
#ifdef DEBUG_
	#define dump(x)  cerr << #x << " = " << (x) << endl;
#else
	#define dump(x)  ;
#endif

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define SZ(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back

//#define int long long

typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

template <typename T>
std::string printVector(const std::vector<T> &data)
{
    std::stringstream ss;
    std::ostream_iterator<T> out_it(ss, ", ");
    ss << "[";
    std::copy(data.begin(), data.end() - 1, out_it);
    ss << data.back() << "]";
    return ss.str();
}

const int MOD = 1e9+7;
const LL LINF = 1001002003004005006ll;
const int INF = 1001001001;

struct UnionFind{
    vector<int> par,rank;
    UnionFind(int N){
        par.assign(N,0);
        rank.assign(N,0);
        REP(i,N) par[i]=i;
    }
    int find(int x){
        if(par[x]==x) return x;
        return par[x]=find(par[x]);
    }
    bool same(int x,int y){
        return find(x)==find(y);
    }
    void unite(int x,int y){
        x=find(x),y=find(y);
        if(x==y) return;
        if(rank[x]<rank[y]) swap(x,y);

        //x becomes root
        par[y]=x;
        if(rank[x]==rank[y]) rank[x]++;
    }
};

template< typename T >
struct edge {
  int src, to;
  T cost;
  edge(int to, T cost) : src(-1), to(to), cost(cost) {}
  edge(int src, int to, T cost) : src(src), to(to), cost(cost) {}
  edge &operator=(const int &x) {
    to = x;
    return *this;
  }
  operator int() const { return to; }
};
template< typename T >
using Edges = vector< edge< T > >;
template< typename T >
using WeightedGraph = vector< Edges< T > >;
using UnWeightedGraph = vector< vector< int > >;
template< typename T >
using Matrix = vector< vector< T > >;

Edges<int> MST;
set<PII> st;
VI adj[112345];
int deg[112345] = {};
int outdeg[112345] = {};

template< typename T >
T kruskal(Edges< T > &edges, int V) {
  sort(begin(edges), end(edges), [](const edge< T > &a, const edge< T > &b) {
    return (a.cost < b.cost);
  });
  UnionFind tree(V);
  T ret = 0;
  for(auto &e : edges) {
    if(!tree.same(e.src, e.to)) {
        ret += e.cost;
        tree.unite(e.src, e.to);
        MST.eb(e.src, e.to, 1);
        st.insert(PII(e.src,e.to));
        adj[e.src].eb(e.to);
        adj[e.to].eb(e.src);

    }
  }
  return (ret);
}

signed main(int argc, char const *argv[])
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<PII> ans;
    int N,M; cin >> N >> M;
    Edges<int> edges;
    REP(i,M){
        int a,b; cin >> a >> b;
        a--; b--;
        edges.eb(a,b,1);
    }

    if(M%2 == 1){
        cout << -1 << endl;
        return 0;
    }
    auto tmp = kruskal(edges,N);
    bool visited[112345] = {};
    dump("step1")
    REP(i,M){
        int s = edges[i].src;
        int t = edges[i].to;
        if(st.find(PII(s,t)) == st.end()){ // not MST
            outdeg[s]++; //s->t
            ans.eb(PII(s,t));
            dump(s)
            dump(t)
        }
        else{
            deg[s]++;
            deg[t]++;
        }
    }
    dump("step2")
    queue<int> que;
    REP(i,N){
        if(deg[i] == 1){
            que.push(i);
        }
    }
    while(!que.empty()){
        int q = que.front(); que.pop();
        visited[q] = 1;
        for(int p : adj[q]){
            if(visited[p]) continue;

            if(outdeg[q]%2 == 0){
                ans.eb(p,q);
                outdeg[p]++;
            }
            else{
                ans.eb(q,p);
            }

            deg[p]--;
            if(deg[p] == 1) que.push(p);
        }

    }

    for(auto x : ans){
        cout << x.first+1 << " " << x.second+1 << endl;
    }


}


Measured memory_bytes: 17268