#include <bits/stdc++.h>
using namespace std;
const int MAXN = 111111;
int g[MAXN][2];
int sz[MAXN];
int n, m, i, j, x, y;
int a[MAXN];
bool check_edge(int x, int y) {
  for (int i = 0; i < sz[x]; i++)
    if (g[x][i] == y) return true;
  return false;
}
bool check() {
  for (i = 0; i < m; i++)
    if (check_edge(a[i], a[i + 1])) {
      return false;
    }
  return true;
}
int main() {
  int startime = clock();
  srand((unsigned)time(NULL));
  cin >> n >> m;
  int mm = m;
  while (mm--) {
    cin >> x >> y;
    g[x][sz[x]++] = y;
    g[y][sz[y]++] = x;
  }
  for (i = 0; i < n; i++) a[i] = i + 1;
  int timer = 0;
  while (true) {
    if (timer * n > 1000) {
      int nowtime = clock();
      if (nowtime - startime > 1400) {
        cout << -1;
        return 0;
      }
    }
    timer++;
    random_shuffle(a, a + n);
    a[n] = a[0];
    if (check()) {
      break;
    }
  }
  for (i = 0; i < m; i++) cout << a[i] << ' ' << a[i + 1] << '\n';
  return 0;
}
