#include <bits/stdc++.h>
using namespace std;
const int MXN = 100100;
const int QQ = 500;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const int mod = 1000000007;
set<pair<int, int> > eds;
int x[MXN];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int a, b;
  for (int i = 0; i < (m); i++) {
    scanf("%d%d", &a, &b);
    eds.insert(make_pair(a, b));
    eds.insert(make_pair(b, a));
  }
  for (int i = 0; i < (n); i++) x[i] = i + 1;
  for (int i = 0; i < (QQ); i++) {
    random_shuffle(x, x + n);
    bool bad = false;
    for (int i = 0; i < (m); i++)
      if (eds.find(make_pair(x[i % n], x[(i + 1) % n])) != eds.end()) {
        bad = true;
        break;
      }
    if (bad) continue;
    for (int i = 0; i < (m); i++) {
      printf("%d %d\n", x[i % n], x[(i + 1) % n]);
    }
    return 0;
  }
  printf("-1");
}
