#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > pairs;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    int u;
    cin >> u;
    int v;
    cin >> v;
    pairs.insert(pair<int, int>(u, v));
    pairs.insert(pair<int, int>(v, u));
  }
  int shuffledlist[n];
  for (int i = 0; i < n; i++) shuffledlist[i] = i + 1;
  for (int i = 0; i < 200; i++) {
    random_shuffle(shuffledlist + 0, shuffledlist + n);
    bool fail = false;
    for (int j = 0; j < m; j++) {
      pair<int, int> p =
          pair<int, int>(shuffledlist[j], shuffledlist[(j + 1) % n]);
      if (pairs.find(p) != pairs.end()) {
        fail = true;
        break;
      }
    }
    if (!fail) {
      for (int j = 0; j < m; j++) {
        cout << shuffledlist[j] << " " << shuffledlist[(j + 1) % n] << endl;
      }
      return 0;
    }
  }
  cout << "-1" << endl;
  return 0;
}
