#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000010;
map<pair<int, int>, int> ex;
pair<int, int> p[maxn];
int N, M, ans[maxn];
bool solve() {
  random_shuffle(ans + 1, ans + N + 1);
  ans[0] = ans[N];
  int cnt = 0;
  for (int i = 1; i <= N; i++)
    if (!ex[make_pair(ans[i - 1], ans[i])]) {
      cnt++;
      p[cnt] = make_pair(ans[i - 1], ans[i]);
    }
  if (cnt < M) return false;
  return true;
}
int main() {
  int T, u, v, i, j;
  scanf("%d%d", &N, &M);
  for (i = 1; i <= M; i++) {
    scanf("%d%d", &u, &v);
    ex[make_pair(u, v)] = 1;
    ex[make_pair(v, u)] = 1;
  }
  for (i = 1; i <= N; i++) ans[i] = i;
  T = 10000000 / M;
  while (T--) {
    if (solve()) {
      for (i = 1; i <= M; i++) printf("%d %d\n", p[i].first, p[i].second);
      return 0;
    }
  }
  puts("-1");
  return 0;
}
