#include <bits/stdc++.h>
using namespace std;
using PII = pair<int, int>;
vector<set<int>> graph;
vector<PII> ans;
int main() {
  int n, m, x, y;
  cin >> n >> m;
  graph.assign(n, {});
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    x--;
    y--;
    graph[x].insert(y);
    graph[y].insert(x);
  }
  if (m % 2 == 1) {
    cout << -1 << endl;
    return 0;
  }
  priority_queue<PII, vector<PII>, greater<PII>> que;
  for (int i = 0; i < n; i++) {
    que.push(make_pair(graph[i].size(), i));
  }
  vector<int> n_out(n, 0);
  while (!que.empty() && ans.size() < m) {
    auto p = que.top();
    que.pop();
    int node = p.second;
    if (graph[node].empty()) {
      continue;
    }
    if (graph[node].size() == 1) {
      int from = node;
      int to = *graph[from].begin();
      if (n_out[from] % 2 == 0) {
        ans.emplace_back(make_pair(to, from));
        n_out[to]++;
      } else {
        ans.emplace_back(make_pair(from, to));
        n_out[from]++;
      }
      graph[from].erase(to);
      graph[to].erase(from);
      que.push(make_pair(graph[from].size(), from));
      que.push(make_pair(graph[to].size(), to));
    }
  }
  for (auto p : ans) {
    cout << p.first + 1 << " " << p.second + 1 << endl;
  }
  return 0;
}
