#include <bits/stdc++.h>
using namespace std;
int n, m, p[111111];
set<int> s[111111];
int main() {
  cin >> n >> m;
  int x, y;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    s[x].insert(y);
    s[y].insert(x);
  }
  srand(time(0));
  for (int tt = 0; tt < 200; tt++) {
    for (int i = 1; i <= n; i++) p[i] = i;
    random_shuffle(p + 1, p + n + 1);
    p[n + 1] = p[1];
    int i;
    for (i = 1; i <= m; i++) {
      if (s[p[i]].count(p[i + 1])) break;
    }
    if (i == m + 1) {
      for (int i = 1; i <= m; i++) {
        cout << p[i] << " " << p[i + 1] << endl;
      }
      return 0;
    }
  }
  cout << "-1" << endl;
  return 0;
}
