#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a, b;
  scanf("%d %d\n", &n, &m);
  map<int, vector<int> > g;
  for (int i = 0; i < m; ++i) {
    scanf("%d %d\n", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  bool solve = false;
  vector<int> x;
  for (int i = 0; i <= n; ++i) {
    x.push_back(i);
  }
  int ntries = 0;
  pair<int, int> remEdge;
  srand(time(NULL));
  while (!solve && ntries < 1000) {
    solve = true;
    random_shuffle(x.begin() + 1, x.end());
    for (int i = 1; i <= m && solve; ++i) {
      for (int j = 0; j < g[x[i]].size(); ++j) {
        if (g[x[i]][j] == x[max((i + 1) % (n + 1), 1)]) {
          solve = false;
          break;
        }
      }
    }
    ++ntries;
  }
  if (!solve) {
    cout << "-1" << endl;
  } else {
    for (int i = 1; i <= m; ++i) {
      printf("%d %d\n", x[i], x[max((i + 1) % (n + 1), 1)]);
    }
  }
  return 0;
}
