#include <bits/stdc++.h>
#pragma GCC optimize(2)
const int MAXN = 1e5;
int n, m, p[MAXN + 5];
std::set<std::pair<int, int> > S;
inline int rint() {
  int x = 0;
  char s = getchar();
  for (; s < '0' || '9' < s; s = getchar())
    ;
  for (; '0' <= s && s <= '9'; s = getchar()) x = x * 10 + (s ^ '0');
  return x;
}
int main() {
  n = rint(), m = rint();
  for (int i = 1, u, v; i <= m; ++i) {
    u = rint(), v = rint();
    if (u > v) u ^= v ^= u ^= v;
    S.insert({u, v});
  }
  for (int i = 1; i <= n; ++i) p[i] = i;
  for (int T = 1; T <= 127; ++T) {
    std::random_shuffle(p + 1, p + n + 1), p[n + 1] = p[1];
    int cur = 0;
    for (int i = 1; i <= n; ++i) {
      int u = p[i], v = p[i + 1];
      if (u > v) u ^= v ^= u ^= v;
      cur += S.find({u, v}) == S.end();
    }
    if (cur >= m) {
      cur = 0;
      for (int i = 1; i <= n && cur < m; ++i) {
        int u = p[i], v = p[i + 1];
        if (u > v) u ^= v ^= u ^= v;
        if (S.find({u, v}) == S.end()) {
          ++cur;
          printf("%d %d\n", u, v);
        }
      }
      return 0;
    }
  }
  puts("-1");
  return 0;
}
