#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> adj[100100];
int main() {
  scanf("%d", &n), scanf("%d", &m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d", &u), scanf("%d", &v);
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int t = 3e7 / n;
  vector<int> vec(n);
  for (int i = 0; i < n; ++i) vec[i] = i, sort(adj[i].begin(), adj[i].end());
  srand(time(0));
  while (t--) {
    random_shuffle(vec.begin(), vec.end());
    bool ok = 1;
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < adj[vec[i]].size(); ++j)
        if (adj[vec[i]][j] == vec[(i + 1) % n]) ok = 0;
      if (!ok) break;
    }
    if (ok) {
      for (int i = 0; i < m; ++i)
        printf("%d %d\n", vec[i] + 1, vec[(i + 1) % n] + 1);
      return 0;
    }
  }
  puts("-1");
}
