#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m, TRY = 1000;
int e[N][2];
int d[N];
bool check() {
  for (int i = 0; i < m; ++i) {
    if (e[d[i]][0] == d[i + 1]) return false;
    if (e[d[i]][1] == d[i + 1]) return false;
  }
  return true;
}
int main() {
  scanf("%d%d", &n, &m);
  int i = m;
  while (i--) {
    int a, b;
    scanf("%d%d", &a, &b);
    e[a][0] ? e[a][1] = b : e[a][0] = b;
    e[b][0] ? e[b][1] = a : e[b][0] = a;
  }
  i = n;
  d[n] = 1;
  while (i--) d[i] = i + 1;
  while (TRY--) {
    if (check()) {
      while (m--) printf("%d %d\n", d[m], d[m + 1]);
      return 0;
    }
    random_shuffle(d, d + n);
    d[n] = d[0];
  }
  puts("-1");
  return 0;
}
