#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int n, m;
unordered_set<int> adj[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].emplace(v);
    adj[v].emplace(u);
  }
  int p[n];
  for (int i = 0; i < n; ++i) p[i] = i + 1;
  for (int iter = 1; iter <= 100; ++iter) {
    shuffle(p, p + n, rng);
    vector<pair<int, int>> edges;
    for (int i = 0; i < n && (int)edges.size() < m; ++i) {
      int u = p[i], v = p[(i + 1) % n];
      if (adj[u].find(v) == adj[u].end()) edges.emplace_back(u, v);
    }
    if ((int)edges.size() == m) {
      for (auto x : edges) cout << x.first << " " << x.second << "\n";
      return 0;
    }
  }
  cout << -1;
  return 0;
}
