#include <bits/stdc++.h>
using namespace std;
int n, m;
set<int> q[10 + 100000];
int a[10 + 100000];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    q[u].insert(v);
    q[v].insert(u);
  }
  for (int l = 0; l < 200; ++l) {
    for (int i = 1; i <= n; ++i) a[i] = i;
    random_shuffle(a + 1, a + n + 1);
    a[n + 1] = a[1];
    int ok = 0, i;
    for (i = 1; i <= n; ++i) {
      if (i > m) break;
      if (q[a[i]].find(a[i + 1]) != q[a[i]].end()) ok = 1;
    }
    if (!ok) {
      for (int i = 1; i <= m; ++i) printf("%d %d\n", a[i], a[i + 1]);
      return 0;
    }
  }
  puts("-1");
  return 0;
}
