#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<set<int> > g;
  g.resize(n);
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    g[x - 1].insert(y - 1);
    g[y - 1].insert(x - 1);
  }
  vector<int> d(n, 0);
  for (int i = 0; i < n; ++i) d[i] = i;
  bool hasSolution = false;
  for (int i = 0; i < 202; ++i) {
    hasSolution = true;
    for (int i = 0; i < n - 1; ++i)
      if (g[d[i]].find(d[i + 1]) != g[d[i]].end() ||
          g[d[i + 1]].find(d[i]) != g[d[i + 1]].end()) {
        hasSolution = false;
        break;
      }
    if (hasSolution) {
      for (int i = 0; i < m; ++i)
        cout << (d[i] + 1) << " " << (d[(i + 1) % n] + 1) << endl;
      return 0;
    }
    if (!hasSolution) random_shuffle(d.begin(), d.end());
  }
  cout << -1 << endl;
}
