#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int n, m, edg[N + 1][2], perm[N];
minstd_rand rng;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    if (edg[u][0])
      edg[u][1] = v;
    else
      edg[u][0] = v;
    if (edg[v][0])
      edg[v][1] = u;
    else
      edg[v][0] = u;
  }
  for (int i = 0; i < n; i++) perm[i] = i + 1;
  while (true) {
    bool ok = true;
    for (int i = 0; i < m; i++) {
      int j = i == n - 1 ? 0 : i + 1;
      if (edg[perm[i]][0] == perm[j] || edg[perm[i]][1] == perm[j]) {
        ok = false;
        break;
      }
    }
    if (ok) {
      for (int i = 0; i < m; i++) {
        int j = i == n - 1 ? 0 : i + 1;
        printf("%d %d\n", perm[i], perm[j]);
      }
      return 0;
    }
    if (n < 10) {
      if (!next_permutation(perm, perm + n)) {
        printf("-1\n");
        return 0;
      }
    } else
      shuffle(perm, perm + n, rng);
  }
}
