#include <bits/stdc++.h>
using namespace std;
int n, m;
set<int> adj[100001];
int tbl[100001];
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    adj[x].insert(y);
    adj[y].insert(x);
  }
  for (int i = 0; i < n; ++i) {
    tbl[i] = i + 1;
  }
  int cnt = 0;
  bool loop = true;
  while (loop && cnt < 250) {
    bool bad = false;
    random_shuffle(tbl, tbl + n);
    for (int i = 0; !bad && i < m; ++i) {
      if (adj[tbl[i]].find(tbl[(i + 1) % n]) != adj[tbl[i]].end()) {
        bad = true;
      }
    }
    if (!bad) {
      loop = false;
      for (int i = 0; i < m; ++i) {
        cout << tbl[i] << ' ' << tbl[(i + 1) % n] << endl;
      }
    }
    ++cnt;
  }
  if (loop) {
    cout << -1 << endl;
  }
  return 0;
}
