#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int INF = 2147483647;
const long long LINF = 9223372036854775807;
const double EPS = 1e-10;
const int MAXN = 1e5 + 50;
inline void EnableFileIO(const string& fileName) {
  if (fileName.empty()) return;
  freopen((fileName + ".in").c_str(), "r", stdin);
  freopen((fileName + ".out").c_str(), "w", stdout);
  return;
}
int n, m;
int perm[MAXN];
set<int> G[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  EnableFileIO("");
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    G[u].insert(v), G[v].insert(u);
  }
  srand(time(0));
  clock_t begin = clock();
  for (int run = 0; run < 200; run++) {
    for (int i = 1; i <= n; i++) perm[i] = i;
    random_shuffle(perm + 1, perm + n + 1);
    perm[n + 1] = perm[1];
    int i;
    for (i = 1; i <= m; i++)
      if (G[perm[i]].count(perm[i + 1])) break;
    if (i == m + 1) {
      for (i = 1; i <= m; i++) cout << perm[i] << ' ' << perm[i + 1] << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
