#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int N = 1e5 + 1, mod = 1e9 + 7;
int n, m, deg[N], ans[N];
set<int> s[N];
mt19937 rng(time(0));
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1, u, v; i <= m; i++) {
    cin >> u >> v;
    s[u].insert(v);
    s[v].insert(u);
  }
  for (int _ = 1; _ <= 1000; _++) {
    for (int i = 1; i <= n; i++) {
      ans[i] = i;
    }
    shuffle(ans + 1, ans + n + 1, rng);
    ans[n + 1] = ans[1];
    bool no = 0;
    for (int i = 1; i <= m; i++) {
      int u = ans[i], v = ans[i + 1];
      if (s[u].count(v)) {
        no = 1;
        break;
      }
    }
    if (!no) {
      for (int i = 1; i <= m; i++) {
        cout << ans[i] << ' ' << ans[i + 1] << '\n';
      }
      return 0;
    }
  }
  cout << -1;
}
