#include <bits/stdc++.h>
using namespace std;
int n, m;
map<pair<int, int>, bool> g;
int p[100005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--;
    y--;
    g[{x, y}] = 1;
    g[{y, x}] = 1;
  }
  srand(time(0));
  for (int op = 0; op < 200; op++) {
    for (int i = 0; i < n; i++) p[i] = i;
    random_shuffle(p, p + n);
    bool f = 1;
    for (int i = 0; i < m; i++)
      if (g.count({p[i], p[(i + 1) % n]})) {
        f = 0;
        break;
      }
    if (f) {
      for (int i = 0; i < m; i++)
        printf("%d %d\n", p[i] + 1, p[(i + 1) % n] + 1);
      return 0;
    }
  }
  puts("-1");
  return 0;
}
