#include <bits/stdc++.h>
using namespace std;
const int M = 100010;
map<pair<int, int>, int> ooo;
int first[M];
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, i, j, k;
  scanf("%d%d", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%d%d", &j, &k);
    ooo[make_pair(min(j, k), max(j, k))] = 1;
  }
  for (i = 0; i < n; i++) first[i] = i + 1;
  int t = 250;
  while (t--) {
    random_shuffle(first, first + n);
    for (i = 0; i < m; i++) {
      if (ooo[make_pair(min(first[i], first[(i + 1) % n]),
                        max(first[i], first[(i + 1) % n]))] == 1)
        break;
    }
    if (i == m) {
      for (i = 0; i < m; i++) {
        printf("%d %d\n", first[i], first[(i + 1) % n]);
      }
      return 0;
    }
  }
  printf("%d\n", -1);
  return 0;
}
