#include <bits/stdc++.h>
using namespace std;
int n, m;
set<int> s[120005];
int p[120005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    s[x].insert(y);
    s[y].insert(x);
  }
  srand(time(0));
  for (int ii = 1; ii <= 200; ii++) {
    for (int j = 1; j <= n; j++) p[j] = j;
    random_shuffle(p + 1, p + n + 1);
    p[n + 1] = p[1];
    int i = 1;
    for (; i <= m; i++)
      if (s[p[i]].find(p[i + 1]) != s[p[i]].end()) break;
    if (i == m + 1) {
      for (int j = 1; j <= m; j++) printf("%d %d\n", p[j], p[j + 1]);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
