#include <bits/stdc++.h>
using namespace std;
int n, m;
set<int> s[100001];
int a[100001];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    s[x].insert(y);
    s[y].insert(x);
  }
  srand(time(0));
  for (int op = 1; op <= 200; op++) {
    for (int i = 1; i <= n; i++) a[i] = i;
    random_shuffle(a + 1, a + n + 1);
    a[n + 1] = a[1];
    int i;
    for (i = 1; i <= m; i++) {
      if (s[a[i]].count(a[i + 1])) break;
    }
    if (i == m + 1) {
      for (i = 1; i <= m; i++) cout << a[i] << " " << a[i + 1] << endl;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
