#include <bits/stdc++.h>
using namespace std;
int i, n, m, x, y, p[120000];
set<int> s[120000];
int main() {
  cin >> n >> m;
  for (i = 1; i <= m; ++i) {
    cin >> x >> y;
    s[x].insert(y);
    s[y].insert(x);
  }
  for (int op = 1; op <= 200; ++op) {
    for (i = 1; i <= n; ++i) p[i] = i;
    random_shuffle(p + 1, p + n + 1);
    p[n + 1] = p[1];
    for (i = 1; i <= m; ++i)
      if (s[p[i]].count(p[i + 1])) break;
    if (i == m + 1) {
      for (i = 1; i <= m; ++i) printf("%d %d\n", p[i], p[i + 1]);
      return 0;
    }
  }
  printf("-1\n");
}
