#include <bits/stdc++.h>
using namespace std;
vector<int> graph[100010];
set<pair<int, int> > p;
queue<pair<int, int> > ans;
int edge[100010] = {};
int edge2[100010] = {};
int used[100010] = {};
int out[100010] = {};
int main() {
  int n, m;
  cin >> n >> m;
  int a, b;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  if (m % 2 == 1) {
    cout << -1 << endl;
    return 0;
  }
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      que;
  for (int i = 1; i <= n; i++) {
    edge2[i] = edge[i] = graph[i].size();
    que.push(make_pair(edge[i], i));
  }
  while (!que.empty()) {
    int t = que.top().first;
    int idx = que.top().second;
    que.pop();
    if (used[idx]) {
      continue;
    }
    used[idx] = 1;
    if ((edge2[idx] + out[idx]) % 2 == 1) {
      for (int i = 0; i < graph[idx].size(); i++) {
        if (p.find(make_pair(idx, graph[idx][i])) == p.end()) {
          if (out[idx] % 2 == 0) {
            out[graph[idx][i]]++;
            edge2[graph[idx][i]]--;
            que.push(make_pair(edge2[graph[idx][i]], graph[idx][i]));
            ans.push(make_pair(graph[idx][i], idx));
            p.insert(make_pair(graph[idx][i], idx));
            p.insert(make_pair(idx, graph[idx][i]));
          } else {
            ans.push(make_pair(idx, graph[idx][i]));
            edge2[graph[idx][i]]--;
            que.push(make_pair(edge2[graph[idx][i]], graph[idx][i]));
            p.insert(make_pair(graph[idx][i], idx));
            p.insert(make_pair(idx, graph[idx][i]));
            out[idx]++;
          }
        }
      }
    } else {
      for (int i = 0; i < graph[idx].size(); i++) {
        if (p.find(make_pair(idx, graph[idx][i])) == p.end()) {
          ans.push(make_pair(idx, graph[idx][i]));
          edge2[graph[idx][i]]--;
          que.push(make_pair(edge2[graph[idx][i]], graph[idx][i]));
          p.insert(make_pair(graph[idx][i], idx));
          p.insert(make_pair(idx, graph[idx][i]));
        }
      }
    }
  }
  if (ans.size() != m) {
    abort();
  }
  while (!ans.empty()) {
    cout << ans.front().first << " " << ans.front().second << endl;
    ans.pop();
  }
  return 0;
}
