#include <bits/stdc++.h>
using namespace std;
vector<int> adj[111111];
int v[111111], good[111111];
int main() {
  int n;
  int m;
  cin >> n;
  cin >> m;
  int s;
  int t;
  for (int i = 0; i < m; i++) {
    cin >> s;
    cin >> t;
    adj[s].push_back(t);
    adj[t].push_back(s);
  }
  for (int i = 0; i < n; i++) v[i] = i + 1;
  int test;
  for (test = 0; test < 100; test++) {
    random_shuffle(v, v + n);
    int t = 0;
    for (int i = 0; i < n; i++) {
      good[i] = 1;
      for (int j = 0; j < adj[v[i]].size(); j++)
        if (adj[v[i]][j] == v[(i + 1) % n]) good[i] = 0;
      if (good[i]) t++;
      if (t == m) break;
    }
    if (t == m) break;
  }
  if (test == 100) {
    cout << -1 << endl;
  } else {
    int t = 0;
    for (int i = 0; i < n; i++)
      if (good[i]) {
        cout << v[i] << " " << v[(i + 1) % n] << endl;
        t++;
        if (t == m) break;
      }
  }
  return 0;
}
