#include <bits/stdc++.h>
using namespace std;
const int maxn = int(1e5) + 10;
int n, m;
set<int> eage[maxn];
int p[maxn];
void work() {
  for (int i = 1; i <= n; i++) p[i] = i;
  random_shuffle(p + 1, p + 1 + n);
  p[n + 1] = p[1];
  for (int i = 1; i <= m; i++)
    if (eage[p[i]].count(p[i + 1])) return;
  for (int i = 1; i <= m; i++) printf("%d %d\n", p[i], p[i + 1]);
  exit(0);
}
int main() {
  srand(time(NULL));
  scanf("%d%d", &n, &m);
  for (int x, y, i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    eage[x].insert(y);
    eage[y].insert(x);
  }
  for (int i = 1; i <= 200; i++) work();
  printf("-1\n");
  return 0;
}
