#include <bits/stdc++.h>
using namespace std;
int n, m, a[100001];
bool vis[100001];
vector<int> g[100001];
int s[100001], e[100001];
bool check(int x, int y) {
  for (int i = 0; i < g[x].size(); i++)
    if (g[x][i] == y) return false;
  return true;
}
int main() {
  srand(time(0));
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  int j = 1;
  for (int i = 1; i <= n; i++) a[i] = i;
  while (j <= 500) {
    j++;
    random_shuffle(a + 1, a + n + 1);
    int t = 0;
    for (int i = 1; i <= n; i++) {
      if (check(a[i], a[i % n + 1])) {
        t++;
        s[t] = a[i];
        e[t] = a[i % n + 1];
      }
    }
    if (t < m)
      continue;
    else {
      for (int i = 1; i <= m; i++) cout << s[i] << " " << e[i] << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
