#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> adj[n + 7];
  for (int i = 0; i <= m - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int tmp = 100;
  vector<int> magic;
  for (int i = 0; i <= n - 1; i++) {
    magic.push_back(i);
  }
  srand(time(0));
  while (tmp--) {
    random_shuffle(magic.begin(), magic.end());
    bool flag = true;
    for (int i = 0; i <= m - 1; i++) {
      int u = magic[i];
      int v = magic[(i + 1) % n];
      int sz = adj[u].size();
      for (int j = 0; j <= sz - 1; j++) {
        int x = adj[u][j];
        if (x == v) flag = false;
      }
      if (!flag) break;
    }
    if (flag) {
      for (int i = 0; i <= m - 1; i++) {
        cout << magic[i] + 1 << " " << magic[(i + 1) % n] + 1 << endl;
      }
      return 0;
    }
  }
  cout << "-1" << endl;
  return 0;
}
