#include <bits/stdc++.h>
int N, M;
using namespace std;
vector<int> Nodes, E[100005];
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    E[a].push_back(b);
    E[b].push_back(a);
  }
  for (int i = 1; i <= N; i++) Nodes.push_back(i);
  for (int t = 0; t < 1000; t++) {
    bool ok = true;
    random_shuffle(Nodes.begin(), Nodes.end());
    for (int i = 0; i < M; i++)
      if (find(E[Nodes[i]].begin(), E[Nodes[i]].end(), Nodes[(i + 1) % N]) !=
          E[Nodes[i]].end()) {
        ok = false;
        break;
      }
    if (ok) {
      for (int i = 0; i < M; i++)
        cout << Nodes[i] << " " << Nodes[(i + 1) % N] << "\n";
      return 0;
    }
  }
  cout << "-1";
}
