#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
set<int> adj[N];
int n, m, p[N];
inline void read_input() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[--u].insert(--v);
    adj[v].insert(u);
  }
}
inline void solve() {
  iota(p, p + n, 0);
  for (int i = 0; i < 1e3; i++) {
    bool ok = true;
    random_shuffle(p, p + n);
    for (int i = 0; ok && i < m; i++) ok &= !adj[p[i]].count(p[(i + 1) % n]);
    if (ok) return;
  }
  cout << -1;
  exit(0);
}
inline void write_output() {
  for (int i = 0; i < m; i++)
    cout << p[i] + 1 << ' ' << p[(i + 1) % n] + 1 << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0), srand(time(0));
  read_input(), solve(), write_output();
  return 0;
}
