#include <bits/stdc++.h>
using namespace std;
const int N = 1E5 + 10;
int n, m;
set<pair<int, int> > s;
int g[N];
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    s.insert(pair<int, int>(u, v));
    s.insert(pair<int, int>(v, u));
  }
  for (int i = 0; i < n; ++i) g[i] = i;
  bool done = 0;
  while (!done) {
    done = 1;
    random_shuffle(g, g + n);
    for (int i = 0; i < m; ++i)
      if (s.find(pair<int, int>(g[i], g[(i + 1) % n])) != s.end()) {
        done = 0;
        break;
      }
    if ((double)clock() / CLOCKS_PER_SEC >= 2.9) break;
  }
  if (!done) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < m; ++i)
    cout << g[i] + 1 << " " << g[(i + 1) % n] + 1 << '\n';
  cout << endl;
  return 0;
}
