#include <bits/stdc++.h>
using namespace std;
const int maxN = 100 * 1000 + 5;
map<pair<int, int>, int> mp;
int a[maxN];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    v--;
    u--;
    mp[{v, u}] = mp[{u, v}] = 1;
  }
  for (int i = 0; i < n; i++) a[i] = i;
  int cnt = 100;
  while (cnt--) {
    random_shuffle(a, a + n);
    int fl = 1;
    for (int i = 0; i < m; i++) {
      if (mp[{a[i], a[(i + 1) % n]}]) {
        fl = 0;
        break;
      }
    }
    if (!fl) continue;
    for (int i = 0; i < m; i++) {
      cout << a[i] + 1 << ' ' << a[(i + 1) % n] + 1 << endl;
    }
    return 0;
  }
  cout << -1 << endl;
  return 0;
}
