#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
map<pair<int, int>, int> mp;
vector<int> adj[maxn];
bool used[maxn];
int d[maxn];
int n, m;
struct node {
  vector<int> vc;
  int st;
  int id;
  node();
  node(vector<int> _vc, int _st, int _id) : vc(_vc), st(_st), id(_id){};
};
struct cmp {
  bool operator()(node a, node b) {
    if ((int)a.vc.size() != (int)b.vc.size())
      return (int)a.vc.size() < (int)b.vc.size();
    if (a.st != b.st) return a.st < b.st;
    return a.id > b.id;
  }
};
priority_queue<node, vector<node>, cmp> que;
void dfs(int u, int f, vector<int>& res) {
  res.push_back(u);
  used[u] = 1;
  for (int i = 0; i < (int)adj[u].size(); ++i) {
    int v = adj[u][i];
    if (v == f || used[v]) continue;
    dfs(v, u, res);
  }
}
int main() {
  while (cin >> n >> m) {
    mp.clear();
    memset(d, 0, sizeof(d));
    for (int i = 0; i <= n; ++i) adj[i].clear();
    for (int i = 0; i < m; ++i) {
      int u, v;
      scanf("%d%d", &u, &v);
      mp[make_pair(u, v)] = 1;
      mp[make_pair(v, u)] = 1;
      adj[u].push_back(v);
      adj[v].push_back(u);
      d[u]++;
      d[v]++;
    }
    while (!que.empty()) que.pop();
    memset(used, 0, sizeof(used));
    int id = 0;
    for (int i = 1; i <= n; ++i)
      if (d[i] <= 1 && !used[i]) {
        vector<int> tmp;
        dfs(i, -1, tmp);
        que.push(node(tmp, 0, ++id));
      }
    for (int i = 1; i <= n; ++i) {
      if (d[i] == 2 && !used[i]) {
        vector<int> tmp;
        dfs(i, -1, tmp);
        que.push(node(tmp, 1, ++id));
      }
    }
    int total = m + 1;
    bool fail = 0;
    vector<int> ans;
    int pre = 0;
    while (total && !fail && !que.empty()) {
      vector<int> vc = que.top().vc;
      int st = que.top().st;
      que.pop();
      int to = ((int)vc.size() - 1) / 2;
      int now = vc[to];
      if (mp.find(make_pair(pre, now)) != mp.end()) {
        fail = 1;
        break;
      }
      ans.push_back(now);
      pre = now;
      --total;
      if (st == 0) {
        vector<int> left, right;
        for (int i = 0; i < to; ++i) left.push_back(vc[i]);
        for (int i = (int)vc.size() - 1; i >= to + 1; --i) {
          right.push_back(vc[i]);
        }
        if ((int)left.size()) que.push(node(left, 0, ++id));
        if ((int)right.size()) que.push(node(right, 0, ++id));
      } else {
        vector<int> left;
        if ((int)vc.size() == 3) {
          vector<int> l, r;
          l.push_back(vc[0]);
          r.push_back(vc[2]);
          que.push(node(l, 0, id + 100000));
          que.push(node(r, 0, id++));
          continue;
        }
        for (int i = to + 1; i < (int)vc.size(); ++i) left.push_back(vc[i]);
        for (int i = 0; i < to; ++i) left.push_back(vc[i]);
        if ((int)left.size()) que.push(node(left, 0, ++id));
      }
    }
    if (fail || total >= 2) {
      cout << -1 << endl;
      continue;
    }
    if (total) ans.push_back(ans[0]);
    for (int i = 0; i < (int)ans.size() - 1; ++i) {
      printf("%d %d\n", ans[i], ans[i + 1]);
    }
  }
  return 0;
}
