#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
set<int> st[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    st[a].insert(b);
    st[b].insert(a);
  }
  vector<int> nodes(n);
  iota(begin(nodes), end(nodes), 0);
  for (int I = 0; I < 500; I++) {
    shuffle(begin(nodes), end(nodes), rng);
    bool ok = true;
    for (int i = 0; i < m; i++) {
      int u = nodes[i], v = nodes[(i + 1) % n];
      if (st[u].count(v)) {
        ok = false;
        break;
      }
    }
    if (ok) {
      for (int i = 0; i < m; i++) {
        int u = nodes[i], v = nodes[(i + 1) % n];
        cout << u + 1 << ' ' << v + 1 << "\n";
      }
      return 0;
    }
  }
  cout << -1 << "\n";
}
