#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > a;
int c[100005];
int main() {
  int n, m, i, k;
  scanf("%d%d", &n, &m);
  for (i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a.insert(make_pair(x, y));
    a.insert(make_pair(y, x));
  }
  for (i = 0; i < n; i++) c[i] = i + 1;
  for (k = 0; k < 1000; k++) {
    random_shuffle(c, c + n);
    c[n] = c[0];
    bool f = true;
    for (i = 0; i < m; i++) {
      if (a.find(make_pair(c[i], c[i + 1])) != a.end()) {
        f = false;
        break;
      }
    }
    if (f) {
      for (i = 0; i < m; i++) printf("%d %d\n", c[i], c[i + 1]);
      return 0;
    }
  }
  puts("-1");
  return 0;
}
