#include <bits/stdc++.h>
std::map<std::pair<int, int>, bool> Map;
int a[100000 + 9];
int main() {
  double be = clock();
  int n, m;
  scanf("%d%d", &n, &m);
  srand(time(0));
  for (int i = 1, x, y; i <= m; ++i) {
    scanf("%d%d", &x, &y);
    Map[std::make_pair(x, y)] = 1;
    Map[std::make_pair(y, x)] = 1;
  }
  for (int i = 0; i < n; ++i) a[i] = i + 1;
  bool t;
  while ((clock() - be) / CLOCKS_PER_SEC < 1.2) {
    std::random_shuffle(a, a + n);
    a[n] = a[0];
    t = 0;
    for (int i = 0; i < m; ++i)
      if (Map[std::make_pair(a[i], a[i + 1])]) {
        t = 1;
        break;
      }
    if (!t) break;
  }
  if (t)
    puts("-1");
  else
    for (int i = 0; i < m; ++i) printf("%d %d\n", a[i], a[i + 1]);
}
