#include <bits/stdc++.h>
using namespace std;
set<int> s[100111];
int arr[100111];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    s[a].insert(b);
    s[b].insert(a);
  }
  for (int test = 0; test <= 200; test++) {
    for (int i = 1; i <= n; i++) arr[i] = i;
    random_shuffle(arr + 1, arr + 1 + n);
    arr[n + 1] = arr[1];
    bool ok = 1;
    for (int i = 1; i <= m; i++) {
      if (s[arr[i]].find(arr[i + 1]) != s[arr[i]].end()) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      for (int i = 1; i <= m; i++) printf("%d %d\n", arr[i], arr[i + 1]);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
