#include <bits/stdc++.h>
using namespace std;
int v[100010], deg[100010];
set<pair<int, int> > e;
bool solve(int n, int m) {
  int c = 10000000 / m, i, x, y;
  pair<int, int> cur;
  for (i = 0; i < n; ++i) v[i] = i;
  while (c--) {
    random_shuffle(v, v + n);
    v[n] = v[0];
    for (i = 0; i < m; ++i) {
      x = v[i];
      y = v[i + 1];
      if (x > y) swap(x, y);
      cur = make_pair(x, y);
      if (e.find(cur) != e.end()) break;
    }
    if (i == m) return true;
  }
  return false;
}
int main() {
  int n, m, i, a, b;
  srand(time(NULL));
  while (~scanf("%d %d", &n, &m)) {
    e.clear();
    for (i = 0; i < m; ++i) {
      scanf("%d %d", &a, &b);
      if (a > b) swap(a, b);
      e.insert(make_pair(a - 1, b - 1));
    }
    if (!solve(n, m))
      printf("-1\n");
    else {
      for (i = 0; i < m; ++i) printf("%d %d\n", v[i] + 1, v[i + 1] + 1);
    }
  }
  return 0;
}
