#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5, inf = 1e9;
int n, m;
set<int> ms[maxn];
vector<int> usm[maxn];
bool bio[maxn];
void prosiri(int x) {
  queue<int> q;
  q.push(x);
  int y;
  bio[x] = 1;
  while (!q.empty()) {
    x = q.front();
    q.pop();
    for (set<int>::const_iterator it = ms[x].begin(); it != ms[x].end(); it++) {
      y = *it;
      if (usm[x].size() % 2 == 0) {
        usm[y].push_back(x);
      } else {
        usm[x].push_back(y);
      }
      ms[y].erase(x);
      if (ms[y].size() == 1) {
        q.push(y);
        bio[y] = 1;
      }
    }
  }
}
void solve() {
  for (int i = 0; i < n; i++) {
    if (ms[i].size() == 1 && !bio[i]) {
      prosiri(i);
    }
  }
  set<pair<int, int> > s;
  for (int i = 0; i < n; i++) {
    if (!bio[i]) {
      s.insert(make_pair(ms[i].size(), i));
    }
  }
  for (set<pair<int, int> >::const_iterator i = s.begin(); i != s.end(); i++) {
    if (!bio[(*i).second]) {
      prosiri((*i).second);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < usm[i].size(); j++) {
      cout << i + 1 << " " << usm[i][j] + 1 << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand(time(NULL));
  cin >> n >> m;
  int a, b;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    a--;
    b--;
    ms[a].insert(b);
    ms[b].insert(a);
  }
  if (m % 2 == 1) {
    cout << -1 << '\n';
  } else {
    solve();
  }
  return 0;
}
