#include <bits/stdc++.h>
using namespace std;
int a[100010];
vector<int> v[100010];
int n, m;
bool flag;
void init() {
  for (int i = 1; i <= n; i++) a[i] = i;
}
void solve() {
  for (int k = 0; k <= 500; k++) {
    random_shuffle(a + 1, a + n + 1);
    bool ok = true;
    for (int i = 1; i <= m; i++) {
      int x = a[i], y = (i == n) ? a[1] : a[i + 1];
      int size = v[x].size();
      for (int j = 0; j < size; j++) {
        if (v[x][j] == y) {
          ok = false;
          break;
        }
      }
      if (!ok) break;
    }
    if (ok) {
      flag = true;
      for (int i = 1; i <= m; i++) {
        int x = a[i], y = (i == n) ? a[1] : a[i + 1];
        printf("%d %d\n", x, y);
      }
      return;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  init();
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  solve();
  if (!flag) printf("-1\n");
  return 0;
}
