#include <bits/stdc++.h>
const long long INF = 2009000999;
const double cs = 3.1415926535897932384626433832795;
const long long MAXN = 101;
using namespace std;
int main() {
  srand(time(NULL));
  set<long long> a[100005];
  long long s[100005];
  long long n, m;
  cin >> n >> m;
  for (int(i) = 0; (i) < (m); (i)++) {
    long long x, y;
    cin >> x >> y;
    x--;
    y--;
    a[x].insert(y);
    a[y].insert(x);
  }
  for (int(_) = 0; (_) < (500); (_)++) {
    long long all = 0;
    for (int(i) = 0; (i) < (n); (i)++) s[i] = i;
    random_shuffle(s, s + n);
    s[n] = s[0];
    for (int(i) = 0; (i) < (n); (i)++)
      if (!a[s[i]].count(s[i + 1])) all++;
    if (all >= m) {
      all = m;
      for (int(i) = 0; (i) < (n); (i)++)
        if (!a[s[i]].count(s[i + 1])) {
          all--;
          cout << s[i] + 1 << " " << s[i + 1] + 1 << endl;
          if (!all) return 0;
        }
    }
  }
  cout << "-1";
  return 0;
}
