#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int N = 100100;
int n, m, a[N];
map<pair<int, int>, bool> edge;
int main() {
  scanf("%d%d", &n, &m);
  int u, v;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &u, &v);
    --u;
    --v;
    edge[{u, v}] = edge[{v, u}] = 1;
  }
  for (int i = 0; i < n; i++) a[i] = i;
  for (int rep = 200; rep--;) {
    random_shuffle(a, a + n);
    bool fail = 0;
    for (int i = 0; i < m; i++)
      if (edge[{a[i], a[(i + 1) % n]}]) {
        fail = 1;
        break;
      }
    if (!fail) {
      for (int i = 0; i < m; i++)
        printf("%d %d\n", a[i] + 1, a[(i + 1) % n] + 1);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
