#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> cycle;
bool vis[N];
vector<int> g[N];
void dfs(int u, int p = -1) {
  cycle.push_back(u);
  vis[u] = 1;
  for (int v : g[u]) {
    if (v == p) continue;
    if (vis[v] == 0) {
      dfs(v, u);
    }
  }
}
bool ache(int u, int v) {
  for (int vv : g[u])
    if (vv == v) return 1;
  return 0;
}
void pos(int n, int m) {
  vector<pair<int, int> > ans;
  for (int i = 0; i < n; i++) {
    if (ache(cycle[i], cycle[(i + 1) % n]) == 0)
      ans.push_back({cycle[i], cycle[(i + 1) % n]});
  }
  if (ans.size() >= m) {
    for (int i = 0; i < m; i++)
      cout << ans[i].first << " " << ans[i].second << "\n";
    ;
    exit(0);
  }
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0; i < n; i++) cycle.push_back(i + 1);
  for (int i = 1; i <= 100; i++) {
    shuffle(cycle.begin(), cycle.end(), rng);
    pos(n, m);
  }
  cout << "-1\n";
}
