#include <bits/stdc++.h>
using namespace std;
const int Len = 100000;
int n, m;
int ord[Len + 5];
set<pair<int, int> > s;
bool connect(int a, int b) {
  if (a > b) swap(a, b);
  if (s.find(make_pair(a, b)) == s.end())
    return true;
  else
    return false;
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    s.clear();
    for (int i = 0; i < m; ++i) {
      int a, b;
      scanf("%d%d", &a, &b);
      if (a > b) swap(a, b);
      s.insert(make_pair(a - 1, b - 1));
    }
    for (int i = 0; i < n; ++i) ord[i] = i;
    bool ok = true;
    if (n <= 8) {
      do {
        ok = true;
        for (int i = 0; i < m; ++i)
          if (!connect(ord[i], ord[(i + 1) % n])) {
            ok = false;
            break;
          }
        if (ok) {
          for (int i = 0; i < m; ++i)
            printf("%d %d\n", ord[i] + 1, ord[(i + 1) % n] + 1);
          break;
        }
      } while (next_permutation(ord, ord + n));
      if (!ok) puts("-1");
    }
    if (n <= 8) continue;
    while (true) {
      random_shuffle(ord, ord + n);
      bool ok = true;
      for (int i = 0; i < m; ++i)
        if (!connect(ord[i], ord[(i + 1) % n])) {
          ok = false;
          break;
        }
      if (ok) {
        for (int i = 0; i < m; ++i)
          printf("%d %d\n", ord[i] + 1, ord[(i + 1) % n] + 1);
        break;
      }
    }
  }
  return 0;
}
