#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
  node(){};
  node(int a, int b) {
    x = a;
    y = b;
  }
} qe[100080];
int next1[100080 * 2], to[100080 * 2], head[100080];
int n, m, a[100080];
bool check() {
  int i, j;
  for (i = 1; i <= m; i++) {
    int tmp;
    if (i == n)
      tmp = 1;
    else
      tmp = i + 1;
    for (j = head[a[i]]; j != -1; j = next1[j]) {
      if (to[j] == a[tmp]) return 0;
    }
  }
  return 1;
}
void getans() {
  int i, j, k;
  for (j = 1; j <= 500; j++) {
    random_shuffle(a + 1, a + n + 1);
    if (check()) {
      for (i = 1; i <= m; i++) {
        int tmp;
        if (i == n)
          tmp = 1;
        else
          tmp = i + 1;
        printf("%d %d\n", a[i], a[tmp]);
      }
      return;
    }
  }
  puts("-1");
}
int main() {
  int i, j, k, top;
  int u, v;
  while (scanf("%d%d", &n, &m) != EOF) {
    memset(head, -1, sizeof(head));
    top = 0;
    for (i = 1; i <= n; i++) a[i] = i;
    for (i = 0; i < m; i++) {
      scanf("%d%d", &u, &v);
      next1[top] = head[u];
      to[top] = v;
      head[u] = top++;
      next1[top] = head[v];
      to[top] = u;
      head[v] = top++;
    }
    getans();
  }
}
