#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
using namespace std;
template <typename T>
void uin(T &a, T b) {
  if (b < a) {
    a = b;
  }
}
template <typename T>
void uax(T &a, T b) {
  if (b > a) {
    a = b;
  }
}
const long long N = 100 * 1000 + 228;
namespace DSU {
long long p[N], sz[N];
void init(long long n) {
  for (long long i = 1; i <= n; ++i) {
    p[i] = i;
    sz[i] = 1;
  }
}
long long getp(long long v) {
  if (v == p[v]) return v;
  p[v] = getp(p[v]);
  return p[v];
}
bool join(long long u, long long v) {
  u = getp(u);
  v = getp(v);
  if (u == v) return 0;
  if (sz[u] < sz[v]) {
    p[u] = v;
    sz[v] += sz[u];
  } else {
    p[v] = u;
    sz[u] += sz[v];
  }
  return 1;
}
};  // namespace DSU
vector<long long> g[N];
vector<pair<long long, long long> > ans;
long long deg[N];
void dfs(long long v, long long par = -1) {
  for (long long to : g[v]) {
    if (to != par) dfs(to, v);
  }
  if (deg[v]) {
    ans.emplace_back(v, par);
  } else {
    if (par != -1) {
      ans.emplace_back(par, v);
      deg[par] ^= 1;
    }
  }
}
long long a[100];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  if (m & 1) {
    cout << -1 << '\n';
    return 0;
  }
  DSU::init(n);
  for (long long i = 0; i < m; ++i) {
    long long u, v;
    cin >> u >> v;
    if (DSU::join(u, v)) {
      g[u].push_back(v);
      g[v].push_back(u);
    } else {
      ans.emplace_back(u, v);
      deg[u] ^= 1;
    }
  }
  dfs(1);
  for (auto p : ans) cout << p.first << ' ' << p.second << '\n';
  return 0;
}
