#include <bits/stdc++.h>
using namespace std;
template <class T, class L>
bool smax(T &x, L y) {
  return x < y ? (x = y, 1) : 0;
}
template <class T, class L>
bool smin(T &x, L y) {
  return y < x ? (x = y, 1) : 0;
}
const int maxn = 1e5 + 17;
int n, m, p[maxn];
pair<int, int> e[maxn];
vector<int> g[maxn], vec;
bool mark[maxn];
void dfs(int v) {
  mark[v] = 1;
  vec.push_back(v);
  for (auto u : g[v])
    if (!mark[u]) dfs(u);
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 0, v, u; i < m; i++) {
    cin >> v >> u;
    e[i] = minmax(v, u);
    g[v].push_back(u), g[u].push_back(v);
  }
  sort(e, e + m);
  if (n < 7) {
    iota(p, p + n, 1);
    do {
      bool ok = 1;
      for (int i = 0; ok && i < m; i++)
        if (binary_search(e, e + m,
                          pair<int, int>(minmax(p[i], p[(i + 1) % n]))))
          ok = 0;
      if (ok) {
        for (int i = 0; i < m; i++)
          cout << p[i] << ' ' << p[(i + 1) % n] << '\n';
        return 0;
      }
    } while (next_permutation(p, p + n));
    return cout << "-1\n", 0;
  }
  vector<int> v;
  for (int t = 0; t < 2; t++)
    for (int i = 1; i <= n; i++)
      if (!mark[i] && (t || g[i].size() == 1)) {
        vec.clear();
        dfs(i);
        for (int i = 0; i < vec.size(); i++)
          v.push_back(i & 1 ? vec[vec.size() - i / 2 - 1] : vec[i / 2]);
      }
  for (int i = 0; i < m; i++) cout << v[i] << ' ' << v[(i + 3) % n] << '\n';
  return 0;
}
