#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int p[N], n, m;
vector<int> V[N];
bool inE(int x, int y) {
  for (int i = 0; i < V[x].size(); ++i)
    if (V[x][i] == y) return true;
  return false;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    V[x].push_back(y);
    V[y].push_back(x);
  }
  int wcnt = 100;
  for (int i = 1; i <= n; ++i) p[i] = i;
  while (wcnt--) {
    random_shuffle(p + 1, p + 1 + n);
    p[n + 1] = p[1];
    int ok = 1;
    for (int i = 1; i <= m; ++i) {
      if (inE(p[i], p[i + 1])) {
        ok = 0;
        break;
      }
    }
    if (!ok) continue;
    for (int i = 1; i <= m; ++i) printf("%d %d\n", p[i], p[i + 1]);
    return 0;
  }
  puts("-1");
  return 0;
}
