#include <bits/stdc++.h>
using namespace std;
int n, m, ans[100005];
set<int> s[100005];
int main() {
  srand(time(NULL));
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    s[u].insert(v);
    s[v].insert(u);
  }
  for (int i = 1; i <= n; i++) ans[i] = i;
  for (int k = 1; k <= 500; k++) {
    random_shuffle(ans + 1, ans + 1 + n);
    ans[0] = ans[n];
    int cnt = 0;
    for (int i = 0; i < n; i++)
      if (s[ans[i]].count(ans[i + 1]))
        continue;
      else
        cnt++;
    if (cnt < m) continue;
    cnt = m;
    for (int i = 0; i < n; i++)
      if (s[ans[i]].count(ans[i + 1]))
        continue;
      else if (cnt) {
        cnt--;
        printf("%d %d\n", ans[i], ans[i + 1]);
      }
    return 0;
  }
  printf("-1\n");
}
