#include <bits/stdc++.h>
std::set<std::pair<int, int> > adj;
int a[100005];
int main() {
  srand(time(0));
  int n, m;
  int aprox;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj.insert(std::make_pair(u, v));
    adj.insert(std::make_pair(v, u));
  }
  for (int i = 0; i < n; ++i) a[i] = i + 1;
  for (aprox = 0; aprox < 999; ++aprox) {
    std::random_shuffle(a, a + n);
    int ok = 1;
    for (int i = 0; i < n; ++i) {
      int u, v;
      u = a[i];
      v = a[(i + 1) % n];
      if (i == m) break;
      if (adj.find(std::make_pair(u, v)) != adj.end()) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      for (int i = 0; i < n; ++i) {
        int u, v;
        u = a[i];
        v = a[(i + 1) % n];
        if (i == m) break;
        printf("%d %d\n", u, v);
      }
      break;
    }
  }
  if (aprox == 999) printf("-1\n");
  return 0;
}
