#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, int> bad;
int x[100010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--;
    v--;
    bad[1LL * v * 1000000LL + u] = bad[1LL * u * 1000000LL + v] = 1;
  }
  for (int i = 0; i < n; i++) x[i] = i;
  for (int i = 1; i <= 1000; i++) {
    random_shuffle(x, x + n);
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      int u = x[j], v = x[(j + 1) % n];
      if (bad[1LL * u * 1000000LL + v]) continue;
      cnt++;
      if (cnt == m) break;
    }
    if (cnt == m) {
      for (int j = 0; j < n; j++) {
        int u = x[j], v = x[(j + 1) % n];
        if (bad[1LL * u * 1000000LL + v]) continue;
        printf("%d %d\n", u + 1, v + 1);
        cnt--;
        if (cnt == 0) return 0;
      }
    }
  }
  puts("-1");
  return 0;
}
