#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10 * 1024;
set<pair<int, int> > S;
int n, m;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    S.insert({u, v});
  }
  vector<int> path(n);
  int start = 1;
  generate(path.begin(), path.end(), [&start]() { return start++; });
  srand((unsigned)time(NULL));
  while (clock() < CLOCKS_PER_SEC * 2.5) {
    bool ok = true;
    for (int i = 1; i <= m && ok; i++) {
      if (S.count({path[i >= n ? 0 : i], path[i - 1]}) ||
          S.count({path[i - 1], path[i >= n ? 0 : i]})) {
        swap(path[i], path[rand() % n]);
        ok = false;
      }
    }
    if (ok) {
      for (int i = 1; i <= m; i++) {
        cout << path[i - 1] << " " << path[i >= n ? 0 : i] << endl;
      }
      return 0;
    }
  }
  cout << -1 << endl;
}
