#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 100000 + 10, MOD = 1000 * 1000 * 1000 + 7,
          INF = 1000 * 1000 * 1000;
const double EPS = 1e-9, PI = 2 * acos(0.0);
int shuff[maxn];
set<pair<int, int> > edge;
int main() {
  ios_base::sync_with_stdio(false);
  int m, n, i, u, v;
  bool flag;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> u >> v;
    edge.insert(make_pair(u, v));
    edge.insert(make_pair(v, u));
  }
  for (i = 0; i < n; i++) shuff[i] = (i + 1707) % n + 1;
  int j = 0;
  while (clock() < 2.8 * CLOCKS_PER_SEC) {
    flag = true;
    random_shuffle(shuff, shuff + n);
    for (i = 0; i < m; i++) {
      if (edge.find(make_pair(shuff[i], shuff[(i + 1) % n])) != edge.end()) {
        flag = false;
        break;
      }
    }
    if (flag) {
      for (i = 0; i < m; i++)
        cout << shuff[i] << " " << shuff[(i + 1) % n] << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
