#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
int p[mx];
map<pair<int, int>, bool> g;
void solve() {
  srand(time(0));
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    g[{u, v}] = true;
    g[{v, u}] = true;
  }
  for (int i = 0; i < n; i++) p[i] = i + 1;
  bool flag = false;
  for (int x = 0; x < 500; x++) {
    bool now = true;
    for (int i = 0; i < m; i++) {
      now &= !g[{p[i % n], p[(i + 1) % n]}];
    }
    if (now) {
      flag = true;
      break;
    }
    random_shuffle(p, p + n);
  }
  if (flag) {
    for (int i = 0; i < m; i++)
      cout << p[i % n] << " " << p[(i + 1) % n] << "\n";
  } else
    cout << -1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  cerr << "\nTime elapsed: " << 1000.0 * clock() / CLOCKS_PER_SEC << " ms\n";
  return 0;
}
