#include <bits/stdc++.h>
using namespace std;
vector<int> G[100010];
int A[100010];
void shuffle(int* x, int sz) {
  unsigned int randi = rand() % sz;
  for (int i = 0; i < sz; ++i) {
    randi = (randi * 183183937 + 3897383);
    int j = i + randi % (sz - i);
    int tmp = x[i];
    x[i] = x[j];
    x[j] = tmp;
  }
}
void TheSolution(istream& input, ostream& output) {
  int n, m, x, y;
  int u = 1, st = 1;
  input >> n >> m;
  for (int i = 1; i < n + 1; ++i) G[i].clear();
  for (int i = 0; i < m; ++i) {
    int x, y;
    input >> x >> y;
    G[x].push_back(y);
    G[y].push_back(x);
  }
  if (n <= 9) {
    for (int i = 0; i < n; ++i) A[i] = i + 1;
    do {
      bool bo = true;
      for (int i = 0; i < m; ++i) {
        if (find((G[A[i]]).begin(), (G[A[i]]).end(), A[(i + 1) % n]) !=
            G[A[i]].end()) {
          bo = false;
          break;
        }
      }
      if (bo) {
        for (int i = 0; i < m; ++i) {
          output << A[i] << " " << A[(i + 1) % n] << "\n";
        }
        return;
      }
    } while (next_permutation(A, A + n));
    output << "-1\n";
    return;
  }
  for (int i = 0; i < n; ++i) {
    A[i] = i + 1;
  }
  for (int i = 0; i < 30; ++i) {
    shuffle(A, n);
    bool bo = true;
    for (int i = 0; i < m; ++i) {
      if (find((G[A[i]]).begin(), (G[A[i]]).end(), A[(i + 1) % n]) !=
          G[A[i]].end()) {
        bo = false;
        break;
      }
    }
    if (bo) {
      for (int i = 0; i < m; ++i) {
        output << A[i] << " " << A[(i + 1) % n] << "\n";
      }
      return;
    }
  }
  output << "-1\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  TheSolution(cin, cout);
  return 0;
}
