#include <bits/stdc++.h>
using namespace std;
int a[100111];
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) == 2) {
    set<pair<int, int> > bad;
    for (int i = (1), _b = (m); i <= _b; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      bad.insert(make_pair(u, v));
      bad.insert(make_pair(v, u));
    }
    for (int turn = 0, _a = (1000); turn < _a; turn++) {
      for (int i = (1), _b = (n); i <= _b; i++) a[i] = i;
      random_shuffle(a + 1, a + n + 1);
      bool failed = false;
      for (int i = (1), _b = (m); i <= _b; i++) {
        int u = a[i];
        int v = (i == n) ? a[1] : a[i + 1];
        if (bad.count(make_pair(u, v))) {
          failed = true;
          break;
        }
      }
      if (!failed) {
        for (int i = (1), _b = (m); i <= _b; i++) {
          int u = a[i];
          int v = (i == n) ? a[1] : a[i + 1];
          printf("%d %d\n", u, v);
        }
        break;
      }
      if (turn == 999) {
        cout << -1 << endl;
      }
    }
  }
  return 0;
}
