#include <bits/stdc++.h>
using namespace std;
const double epsilon = 0.001;
const int N = 1e5 + 5;
int n, m;
vector<int> nb[N];
vector<int> v;
int main() {
  int x, y;
  int i, j, k;
  bool fl;
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    nb[x].push_back(y);
    nb[y].push_back(x);
  }
  for (i = 1; i <= n; i++) v.push_back(i);
  for (k = 1; k <= 100; k++) {
    if (clock() / (double)CLOCKS_PER_SEC - 2.4 >= epsilon) break;
    random_shuffle(v.begin(), v.end());
    fl = true;
    for (i = 0; i < m; i++) {
      x = v[i];
      y = v[(i + 1) % n];
      for (j = 0; j < nb[x].size(); j++)
        if (nb[x][j] == y) fl = false;
      if (fl == false) break;
    }
    if (fl) {
      for (i = 0; i < m; i++) {
        x = v[i];
        y = v[(i + 1) % n];
        cout << x << " " << y << endl;
      }
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
