#include <bits/stdc++.h>
using namespace std;
int n, m, a, b;
int main() {
  cin >> n >> m;
  vector<int> E;
  vector<vector<int> > G(n + 1, E);
  for (int i = 0; i < m; ++i) {
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  vector<int> v(n, 0);
  for (int i = 0; i < n; ++i) {
    v[i] = i + 1;
  }
  int times;
  int t = 0;
  for (times = 0; times < 100; ++times) {
    random_shuffle(v.begin(), v.end());
    bool ok = true;
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < G[v[i]].size(); ++j) {
        if (G[v[i]][j] == v[(i + 1) % n]) {
          ok = false;
          break;
        }
      }
      if (!ok) break;
    }
    if (ok) break;
  }
  if (times == 100) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < m; ++i) {
    cout << v[i] << " " << v[(i + 1) % n] << endl;
  }
  return 0;
}
