#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > s;
int main() {
  int n, m, u, v;
  scanf("%d %d", &n, &m);
  for (int(i) = 0; (i) < (m); (i)++) {
    scanf("%d %d", &u, &v);
    s.insert(make_pair(u, v));
    s.insert(make_pair(v, u));
  }
  vector<int> p;
  for (int(i) = 0; (i) < (n); (i)++) p.push_back(i + 1);
  for (int(it) = 0; (it) < (100); (it)++) {
    random_shuffle((p).begin(), (p).end());
    bool OK = 1;
    for (int(i) = 0; (i) < (m); (i)++) {
      if (s.count(make_pair(p[i], p[(i + 1) % n]))) {
        OK = 0;
        break;
      }
    }
    if (OK) {
      for (int(i) = 0; (i) < (m); (i)++) {
        printf("%d %d\n", p[i], p[(i + 1) % n]);
      }
      return 0;
    }
  }
  puts("-1");
  return 0;
}
