// OURL: https://atcoder.jp/contests/agc035/tasks/agc035_b
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define RREP(i,a,n) for(int i=(a),i##_len=(n);i<i##_len;++i)
#define MAT1D(V,T,a) vector<T> V (a)
#define MAT2D(V,T,a,b) vector<vector<T>> V (a, vector<T>(b))
#define MAT3D(V,T,a,b,c) vector<vector<vector<T>>> V (a, vector<vector<T>>(b, vector<T>(c)))

struct node {
  int p;
  unordered_set<int> c;

  bool exists(int v) {
    return c.find(v) != c.end();
  }
};

// http://beet-aizu.hatenablog.com/entry/2018/04/08/145516
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){ return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...)); }

template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}
template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){ for(auto &e:t) fill_v(e,v); }

template <typename A>
string to_string(A v) { bool first = true; string res = "{"; for (const auto &x : v) { if (!first) { res += ", "; } first = false; res += to_string(x); } res += "}"; return res; }

string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string) s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool>::reference b) { return to_string(bool(b)); }
template <typename A, typename B>
string to_string(pair<A, B> p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; }
template <typename A>
string to_string(vector<vector<A>> v) { string res; for(const auto &x : v) {res+="\n ";res += to_string(x);} return res;}
string to_string(node n) { return to_string(n.p) + "-" + to_string(n.c);}

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); }

#ifdef LOCAL
#define debug(...) cerr << "[L" << to_string(__LINE__) << ":" <<#__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

using vset = vector<unordered_set<int>>;
using vvi = vector<vector<int>>;
using vt = vector<node>;

int N,M;

void solve(vset& ansg, vt& tree, int idx) {
  for(auto& i : tree[idx].c) {
   solve(ansg, tree, i);
  }
  if (idx != 0) {
    if (ansg[idx].size() % 2 == 0) {
      ansg[tree[idx].p].insert(idx);
    } else {
      ansg[idx].insert(tree[idx].p);
    }
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> N >> M;
  if (M % 2 != 0) {
    cout << -1 << endl;
    return 0;
  }
  auto edge = make_v<unordered_set<int>>(N);
  REP(i,M) {
    int a,b;
    cin >> a >> b;
    edge[a-1].insert(b-1);
    edge[b-1].insert(a-1);
  }
  auto tree = make_v<node>(N);
  auto done = make_v<int>(N);
  queue<int> q;
  q.push(0);
  done[0] = 1;
  while(q.size() > 0) {
    int v = q.front(); q.pop();
    for (auto& w : edge[v]) {
      if (done[w] == 0) {
        q.push(w);
        done[w] = 1;
        tree[v].c.insert(w);
        tree[w].p = v;
      }
    }
  }
  debug(tree);
  auto ansg = make_v<unordered_set<int>>(N);
  REP(i,N) {
    auto& es = edge[i];
    for (auto& v: es) {
      if (!tree[i].exists(v) && !tree[v].exists(i) && ansg[i].find(v) == ansg[i].end() && ansg[v].find(i) == ansg[v].end()) { // not in tree
        ansg[i].insert(v);
      }
    }
  }
  debug(ansg);
  solve(ansg, tree, 0);
  debug(ansg);
  stringstream ss;
  REP(i,N) {
    for (auto & v : ansg[i]) {
      ss << i+1 << " " << v+1 << endl;
    }
  }
  cout << ss.str() << endl;
  return 0;
}


Measured memory_bytes: 47240